From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 5/6] [gdb/testsuite] Fix gdb.server/sysroot.exp for remote host
Date: Tue, 28 Mar 2023 17:48:54 +0200 [thread overview]
Message-ID: <20230328154855.32238-6-tdevries@suse.de> (raw)
In-Reply-To: <20230328154855.32238-1-tdevries@suse.de>
Fix test-case gdb.server/sysroot.exp for remote host, by:
- using gdb_remote_download, and
- disabling the "local" scenario for remote host/target, unless
remote host == remote target.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.server/sysroot.exp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp
index ac2a03d0c8f..35f15d6c60e 100644
--- a/gdb/testsuite/gdb.server/sysroot.exp
+++ b/gdb/testsuite/gdb.server/sysroot.exp
@@ -28,11 +28,16 @@ if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=-
}
set target_binfile [gdb_remote_download target $binfile]
+set host_binfile [gdb_remote_download host $binfile]
# Run once with sysroot set to the local filesystem and once set to the remote
# target.
set modes {}
-if { ![is_remote target] } {
+if { ( ![is_remote host] && ![is_remote target ] )
+ || [board_info host name] == [board_info target name] } {
+ # Local means that gdb and gdbserver look at the same file system. That's
+ # not the case for remote host or remote target, unless
+ # remote host == remote target.
lappend modes "local"
}
lappend modes "remote"
@@ -44,7 +49,7 @@ foreach_with_prefix sysroot $modes {
if { $sysroot == "local" } {
set sysroot_command "/"
- set reading_symbols "Reading symbols from $binfile..."
+ set reading_symbols "Reading symbols from $host_binfile..."
set timeout_factor 1
} else {
set sysroot_command "target:"
--
2.35.3
next prev parent reply other threads:[~2023-03-28 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 15:48 [pushed 0/6] [gdb/testsuite] Fix gdb.server " Tom de Vries
2023-03-28 15:48 ` [pushed 1/6] [gdb/testsuite] Fix local-remote-host-native.exp for gdb.server tests Tom de Vries
2023-03-28 15:48 ` [pushed 2/6] [gdb/testsuite] Fix gdb.server/file-transfer.exp for remote host Tom de Vries
2023-03-28 15:48 ` [pushed 3/6] [gdb/testsuite] Fix gdb.server/solib-list.exp " Tom de Vries
2023-03-28 15:48 ` [pushed 4/6] [gdb/testsuite] Require non-remote host for gdb.server/multi-ui-errors.exp Tom de Vries
2023-03-28 15:48 ` Tom de Vries [this message]
2023-03-28 15:48 ` [pushed 6/6] [gdb/testsuite] Fix gdb.server/server-kill-python.exp for remote host Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230328154855.32238-6-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).