diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp index 774b90bcdb0f7409c6d38cfc031d9eff671d6371..d9920146fa41414b6303d007d883190527d533a5 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp @@ -14,16 +14,21 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. set opts {} -standard_testfile .S +standard_testfile .S .c if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-inline.exp COMPILE=1" - standard_testfile + standard_testfile .c .c lappend opts debug optimize=-O2 } else { require is_x86_64_m64_target } +# Make .c available on the host. +if [is_remote host] { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { return -1 } @@ -32,8 +37,7 @@ if ![runto_main] { return -1 } -set srcfile $testfile.c -gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2] gdb_continue_to_breakpoint "break-here" ".* break-here .*" gdb_test "p y" " = 25" diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp index f6d11b26cc795fb463065b79a9b9d3a651eb484f..17a92bdcbf5c892297b2d9b14c7a7b9f650e42f0 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp @@ -18,12 +18,17 @@ set opts {} if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param-dwarf5.exp COMPILE=1" - set srcfile ${srcfile2} + standard_testfile .c .c lappend opts optimize=-O2 additional_flags=-gdwarf-5 } else { require is_x86_64_m64_target } +# Make .c available on the host. +if [is_remote host] { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { return -1 } @@ -32,8 +37,7 @@ if ![runto_main] { return -1 } -set srcfile $srcfile2 -gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2] with_test_prefix "call 1" { gdb_continue_to_breakpoint "break-here" ".* break-here .*" diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp index da1445f51c2a70377a9bb3041974ef43f3852e0f..504c534d6545a1e61b63152c3aee80f4398bb4fb 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp @@ -18,12 +18,17 @@ set opts {} if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1" - set srcfile ${srcfile2} + standard_testfile .c .c lappend opts debug optimize=-O2 } else { require is_x86_64_m64_target } +# Make .c available on the host. +if [is_remote host] { + remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { return -1 } @@ -32,8 +37,7 @@ if ![runto_main] { return -1 } -set srcfile $srcfile2 -gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2] with_test_prefix "call 1" { gdb_continue_to_breakpoint "break-here" ".* break-here .*" diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp index ff3e0242e9a8523e453251cbd1642f37bc35b0fd..4b4f507dd8257f7330996bea4b5f6776bcbdd3d8 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp @@ -17,6 +17,11 @@ standard_testfile .S .cc require is_x86_64_m64_target +# Make .cc available on the host. +if [is_remote host] { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing_full "failed to prepare" \ [list $testfile "c++" $srcfile {}]] } { return -1 @@ -26,8 +31,7 @@ if ![runto_main] { return -1 } -set srcfile $srcfile2 -gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2] gdb_continue_to_breakpoint "break-here" ".* break-here .*" gdb_test "frame" {bar \(ref=@0x[0-9a-f]+: 10, ref@entry=@0x[0-9a-f]+: <optimized out>\) at .*} diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp index 1602aff5dc5271658ee1c8aec460537754f50e9c..5ba435e5e72acd150c5ce6fb5e442d14dcf6049e 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp @@ -14,16 +14,21 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. set opts {} -standard_testfile .S +standard_testfile .S .c if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-ret.exp COMPILE=1" - standard_testfile + standard_testfile .c .c lappend opts debug optimize=-O2 } else { require is_x86_64_m64_target } +# Make .c available on the host. +if [is_remote host] { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { return -1 }