diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-28 17:48:35 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-28 17:48:35 +0200 |
commit | 16fe515a1d1855ddc20cee51000dbbf4d7ac06be (patch) | |
tree | fcc9ba5f3fd5222012c5c24f89fef2f550c58da6 /gdb | |
parent | 3efcb62566c3abff7b373f9c536a51b8b78e59df (diff) | |
download | gdb-16fe515a1d1855ddc20cee51000dbbf4d7ac06be.zip gdb-16fe515a1d1855ddc20cee51000dbbf4d7ac06be.tar.gz gdb-16fe515a1d1855ddc20cee51000dbbf4d7ac06be.tar.bz2 |
[gdb/testsuite] Fix gdb.server/sysroot.exp for remote host
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.server/sysroot.exp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index ac2a03d..35f15d6 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:" |