From f1e5a2b4e28bd93e6d170e5b76b39fc4f2af6f84 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 28 Mar 2023 22:15:18 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.btrace/reconnect.exp for remote target Fix test-case gdb.btrace/reconnect.exp for target board remote-gdbserver-on-localhost using gdb_remote_download. Tested on x86_64-linux. --- gdb/testsuite/gdb.btrace/reconnect.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp index 2c8358327a4..0365b054204 100644 --- a/gdb/testsuite/gdb.btrace/reconnect.exp +++ b/gdb/testsuite/gdb.btrace/reconnect.exp @@ -27,6 +27,8 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 } +set target_binfile [gdb_remote_download target $binfile] + # Make sure we're disconnected and no recording is active, in case # we're testing with an extended-remote board, therefore already # connected. @@ -37,7 +39,7 @@ with_test_prefix "preparation" { # Start fresh gdbserver. set gdbserver_reconnect_p 1 -set res [gdbserver_start "" $binfile] +set res [gdbserver_start "" $target_binfile] set gdbserver_protocol [lindex $res 0] set gdbserver_gdbport [lindex $res 1] gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport -- 2.30.2