public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.server/sysroot.exp for remote target Date: Thu, 9 Mar 2023 09:45:17 +0000 (GMT) [thread overview] Message-ID: <20230309094517.C1DFD3858D33@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6407713fab73abcfcf1893451bfc6ac6c91e609c commit 6407713fab73abcfcf1893451bfc6ac6c91e609c Author: Tom de Vries <tdevries@suse.de> Date: Thu Mar 9 10:45:03 2023 +0100 [gdb/testsuite] Fix gdb.server/sysroot.exp for remote target Fix test-case gdb.server/sysroot.exp with target board remote-gdbserver-on-localhost, by: - using gdb_remote_download, and - disabling the "local" scenario for remote host. Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.server/sysroot.exp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index 715d6001020..ac2a03d0c8f 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -27,9 +27,17 @@ if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=- return -1 } +set target_binfile [gdb_remote_download target $binfile] + # Run once with sysroot set to the local filesystem and once set to the remote # target. -foreach_with_prefix sysroot { "local" "remote" } { +set modes {} +if { ![is_remote target] } { + lappend modes "local" +} +lappend modes "remote" + +foreach_with_prefix sysroot $modes { global srcdir global subdir global binfile @@ -40,7 +48,7 @@ foreach_with_prefix sysroot { "local" "remote" } { set timeout_factor 1 } else { set sysroot_command "target:" - set reading_symbols "Reading $binfile from remote target..." + set reading_symbols "Reading .*$target_binfile from remote target..." set timeout_factor 5 } @@ -55,7 +63,7 @@ foreach_with_prefix sysroot { "local" "remote" } { gdb_test "disconnect" ".*" # Start GDBserver. - set res [gdbserver_start "" $binfile] + set res [gdbserver_start "" $target_binfile] set gdbserver_protocol [lindex $res 0] set gdbserver_gdbport [lindex $res 1]
reply other threads:[~2023-03-09 9:45 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230309094517.C1DFD3858D33@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).