diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-27 13:58:09 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-27 13:58:09 +0200 |
commit | 845d99df89b8eee01de354f49489b2863673122c (patch) | |
tree | 59e5786ceef1c2f6a04e97781b82eb2713257d79 | |
parent | 88fc1be26acbd83afed2eb8fc7e364cd45447ba3 (diff) | |
download | binutils-845d99df89b8eee01de354f49489b2863673122c.zip binutils-845d99df89b8eee01de354f49489b2863673122c.tar.gz binutils-845d99df89b8eee01de354f49489b2863673122c.tar.bz2 |
[gdb/testsuite] Fix have_index for remote host
Proc have_index is mostly used with $binfile, which gives problems
for remote host.
Fix this by using "file tail" on the proc argument.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 813b755..c0762cb 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -8740,6 +8740,10 @@ proc readnow { } { # Otherwise, return "". proc have_index { objfile } { + # This proc is mostly used with $binfile, but that gives problems with + # remote host, while using $testfile would work. + # Fix this by reducing $binfile to $testfile. + set objfile [file tail $objfile] set res "" set cmd "maint print objfiles $objfile" |