[gdb/testsuite] Handle remote host in escape_for_host
authorTom de Vries <tdevries@suse.de>
Fri, 17 Mar 2023 12:29:13 +0000 (13:29 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 17 Mar 2023 12:29:13 +0000 (13:29 +0100)
commita14e3d11b2656355ca2c3d5b5a9f05e46f71e897
treeba67dc89bfd65678df4af60a0354f91c91abce21
parentff000c4dbb2b99531c8cda1e0e67e787ce8aef20
[gdb/testsuite] Handle remote host in escape_for_host

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