From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 2/2] [gdb/testsuite] Handle remote host in escape_for_host
Date: Fri, 17 Mar 2023 13:30:07 +0100 [thread overview]
Message-ID: <20230317123007.3889-2-tdevries@suse.de> (raw)
In-Reply-To: <20230317123007.3889-1-tdevries@suse.de>
With test-case gdb.arch/ftrace-insn-reloc.exp and host board
local-remote-host-notty and target board native-gdbserver, I run into:
...
FAIL: gdb.arch/ftrace-insn-reloc.exp: IPA loaded
...
due to having:
...
$ readelf -d ftrace-insn-reloc | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: []
...
instead of:
...
$ readelf -d ftrace-insn-reloc | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN]
...
Handle this in escape_for_host.
Tested on x86_64-linux.
---
gdb/testsuite/lib/gdb.exp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b45c73fcc1a..8b1127ce0bc 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4656,8 +4656,14 @@ set gdb_saved_set_unbuffered_mode_obj ""
# Escape STR sufficiently for use on host commandline.
proc escape_for_host { str } {
- set map {
- {$} {\$}
+ if { [is_remote host] } {
+ set map {
+ {$} {\\$}
+ }
+ } else {
+ set map {
+ {$} {\$}
+ }
}
return [string map $map $str]
--
2.35.3
prev parent reply other threads:[~2023-03-17 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 12:30 [pushed 1/2] [gdb/testsuite] Add escape_for_host Tom de Vries
2023-03-17 12:30 ` Tom de Vries [this message]
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=20230317123007.3889-2-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).