public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix have_index for remote host
@ 2023-03-27 11:58 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-27 11:58 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=845d99df89b8eee01de354f49489b2863673122c

commit 845d99df89b8eee01de354f49489b2863673122c
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Mar 27 13:58:09 2023 +0200

    [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.

Diff:
---
 gdb/testsuite/lib/gdb.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 813b755215e..c0762cbb3a8 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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-27 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 11:58 [binutils-gdb] [gdb/testsuite] Fix have_index for remote host Tom de Vries

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).