This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] GDB test suite: Add helper for locating core files
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 09 Oct 2017 20:46:21 +0200
- Subject: Re: [PATCH 1/2] GDB test suite: Add helper for locating core files
- Authentication-results: sourceware.org; auth=none
- References: <1505760152-28775-1-git-send-email-arnez@linux.vnet.ibm.com> <1505760152-28775-2-git-send-email-arnez@linux.vnet.ibm.com> <20171007094545.1bba5c51@pinnacle.lan>
On Sat, Oct 07 2017, Kevin Buettner wrote:
[...]
> E.g. when I test your patch on my x86-64 linux box using the
> following command...
>
> make check RUNTESTFLAGS="--target_board=native-gdbserver"
>
> ...I see 32 fewer passes than before and also one more known failure.
>
> Here are the passes that no longer occur when using your patch:
[...]
> Instead, several warnings are now printed instead:
>
> WARNING: Can not generate core dump on remote target.
These warnings are newly introduced by the patch. They are meant to
improve diagnostics when someone attempts to run the tests on a "real"
remote target. I wanted to clearly document the fact that this is
unsupported (and always was). Also, by documenting this restriction,
maybe someone feels encouraged to lift it ;-)
But it seems I went overboard, now also bailing out in case of
native-gdbserver, which is unnecessary, since no extra handling is
required for that.
How to fix this, though? Rather than bailing out on "is_remote target",
maybe we should check for "isnative" instead? See the delta-patch
below. This should fix the problem with native-gdbserver and is
probably not worse than before in other scenarios, so maybe it's good
enough. WDYT?
> If you can restore support for handling of remote core files, I'd very
> much like to review this patch again.
Thanks, I'd appreciate that.
--
Andreas
-- >8 --
Subject: [PATCH] Squash into "GDB test suite: Add helper for locating core files"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2c5e94d..091933a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5850,7 +5850,7 @@ proc exec_in_dir {dir command} {
# Return the core file's filename, or "", if none was found.
proc run_and_get_core {binfile {arg ""}} {
- if {[is_remote target]} {
+ if {![isnative]} {
warning "Can not generate core dump on remote target."
return ""
}
@@ -5883,7 +5883,7 @@ proc run_and_get_core {binfile {arg ""}} {
# specified. Return that path name, or "" if no core file was found.
proc find_core {binfile coredir {destcore ""}} {
- if {[is_remote target]} {
+ if {![isnative]} {
warning "Can not access remote core file."
return ""
}