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 | 4516ff910bb256b629c72cc5cf3535607296e42d (patch) | |
tree | 3ab266d3322d5057c95591052ddbff5b5a5954cc | |
parent | 16fe515a1d1855ddc20cee51000dbbf4d7ac06be (diff) | |
download | gdb-4516ff910bb256b629c72cc5cf3535607296e42d.zip gdb-4516ff910bb256b629c72cc5cf3535607296e42d.tar.gz gdb-4516ff910bb256b629c72cc5cf3535607296e42d.tar.bz2 |
[gdb/testsuite] Fix gdb.server/server-kill-python.exp for remote host
Fix test-case gdb.server/server-kill-python.exp for remote host using
gdb_remote_download.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/gdb.server/server-kill-python.exp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp index f6b3730..ae85791 100644 --- a/gdb/testsuite/gdb.server/server-kill-python.exp +++ b/gdb/testsuite/gdb.server/server-kill-python.exp @@ -31,6 +31,7 @@ if {[build_executable "failed to prepare" ${testfile} \ } set target_binfile [gdb_remote_download target $binfile] +set host_binfile [gdb_remote_download host $binfile] # Start gdbserver. set res [gdbserver_spawn "${target_binfile}"] @@ -47,6 +48,7 @@ puts $fd \ "import gdb def do_gdb_stuff (): + gdb.execute ('file $host_binfile') gdb.execute ('target $gdbserver_protocol $gdbserver_gdbport') gdb.execute ('break $srcfile:$break_linenr') gdb.execute ('continue') @@ -56,10 +58,12 @@ def do_gdb_stuff (): do_gdb_stuff()" close $fd +set host_file1 [gdb_remote_download host $file1] + # Now start GDB, sourcing the python command file we generated above. # Set the height and width so we don't end up at a paging prompt. if {[gdb_spawn_with_cmdline_opts \ - "-quiet -iex \"set height 0\" -iex \"set width 0\" -ex \"source $file1\""] != 0} { + "-quiet -iex \"set height 0\" -iex \"set width 0\" -ex \"source $host_file1\""] != 0} { fail "spawn" return } |