From 7686c074591882316c738d09af170b43f42f3ffe Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Jun 2012 17:54:59 +0000 Subject: [PATCH] * gdb.reverse/break-precsave.exp: Use standard_testfile. * gdb.reverse/break-reverse.exp: Use standard_testfile. * gdb.reverse/consecutive-precsave.exp: Use standard_testfile. * gdb.reverse/consecutive-reverse.exp: Use standard_testfile. * gdb.reverse/finish-precsave.exp: Use standard_testfile. * gdb.reverse/finish-reverse-bkpt.exp: Use standard_testfile. * gdb.reverse/finish-reverse.exp: Use standard_testfile. * gdb.reverse/i386-precsave.exp: Use standard_testfile, prepare_for_testing. * gdb.reverse/i386-reverse.exp: Use standard_testfile, prepare_for_testing. * gdb.reverse/i386-sse-reverse.exp: Use standard_testfile, prepare_for_testing. * gdb.reverse/i387-env-reverse.exp: Use standard_testfile, prepare_for_testing. * gdb.reverse/i387-stack-reverse.exp: Use standard_testfile, prepare_for_testing * gdb.reverse/machinestate-precsave.exp: Use standard_testfile. * gdb.reverse/machinestate.exp: Use standard_testfile. * gdb.reverse/next-reverse-bkpt-over-sr.exp: Use standard_testfile. * gdb.reverse/sigall-precsave.exp: Use standard_testfile, build_executable. * gdb.reverse/sigall-reverse.exp: Use standard_testfile, build_executable. * gdb.reverse/solib-precsave.exp: Use standard_testfile, standard_output_file. * gdb.reverse/solib-reverse.exp: Use standard_testfile, standard_output_file. * gdb.reverse/step-precsave.exp: Use standard_testfile. * gdb.reverse/step-reverse.exp: Use standard_testfile. * gdb.reverse/until-precsave.exp: Use standard_testfile. * gdb.reverse/until-reverse.exp: Use standard_testfile. * gdb.reverse/watch-precsave.exp: Use standard_testfile. * gdb.reverse/watch-reverse.exp: Use standard_testfile. --- gdb/testsuite/ChangeLog | 37 +++++++++++++++++++ gdb/testsuite/gdb.reverse/break-precsave.exp | 3 +- gdb/testsuite/gdb.reverse/break-reverse.exp | 3 +- .../gdb.reverse/consecutive-precsave.exp | 3 +- .../gdb.reverse/consecutive-reverse.exp | 3 +- gdb/testsuite/gdb.reverse/finish-precsave.exp | 3 +- .../gdb.reverse/finish-reverse-bkpt.exp | 3 +- gdb/testsuite/gdb.reverse/finish-reverse.exp | 3 +- gdb/testsuite/gdb.reverse/i386-precsave.exp | 14 ++----- gdb/testsuite/gdb.reverse/i386-reverse.exp | 14 ++----- .../gdb.reverse/i386-sse-reverse.exp | 14 ++----- .../gdb.reverse/i387-env-reverse.exp | 14 ++----- .../gdb.reverse/i387-stack-reverse.exp | 14 ++----- .../gdb.reverse/machinestate-precsave.exp | 7 ++-- gdb/testsuite/gdb.reverse/machinestate.exp | 7 ++-- .../gdb.reverse/next-reverse-bkpt-over-sr.exp | 3 +- gdb/testsuite/gdb.reverse/sigall-precsave.exp | 10 ++--- gdb/testsuite/gdb.reverse/sigall-reverse.exp | 10 ++--- gdb/testsuite/gdb.reverse/solib-precsave.exp | 6 +-- gdb/testsuite/gdb.reverse/solib-reverse.exp | 6 +-- gdb/testsuite/gdb.reverse/step-precsave.exp | 3 +- gdb/testsuite/gdb.reverse/step-reverse.exp | 3 +- gdb/testsuite/gdb.reverse/until-precsave.exp | 13 +++---- gdb/testsuite/gdb.reverse/until-reverse.exp | 13 +++---- gdb/testsuite/gdb.reverse/watch-precsave.exp | 4 +- gdb/testsuite/gdb.reverse/watch-reverse.exp | 4 +- 26 files changed, 94 insertions(+), 123 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4dfa7c2a065..5eb76ec8857 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,40 @@ +2012-06-26 Tom Tromey + + * gdb.reverse/break-precsave.exp: Use standard_testfile. + * gdb.reverse/break-reverse.exp: Use standard_testfile. + * gdb.reverse/consecutive-precsave.exp: Use standard_testfile. + * gdb.reverse/consecutive-reverse.exp: Use standard_testfile. + * gdb.reverse/finish-precsave.exp: Use standard_testfile. + * gdb.reverse/finish-reverse-bkpt.exp: Use standard_testfile. + * gdb.reverse/finish-reverse.exp: Use standard_testfile. + * gdb.reverse/i386-precsave.exp: Use standard_testfile, + prepare_for_testing. + * gdb.reverse/i386-reverse.exp: Use standard_testfile, + prepare_for_testing. + * gdb.reverse/i386-sse-reverse.exp: Use standard_testfile, + prepare_for_testing. + * gdb.reverse/i387-env-reverse.exp: Use standard_testfile, + prepare_for_testing. + * gdb.reverse/i387-stack-reverse.exp: Use standard_testfile, + prepare_for_testing + * gdb.reverse/machinestate-precsave.exp: Use standard_testfile. + * gdb.reverse/machinestate.exp: Use standard_testfile. + * gdb.reverse/next-reverse-bkpt-over-sr.exp: Use standard_testfile. + * gdb.reverse/sigall-precsave.exp: Use standard_testfile, + build_executable. + * gdb.reverse/sigall-reverse.exp: Use standard_testfile, + build_executable. + * gdb.reverse/solib-precsave.exp: Use standard_testfile, + standard_output_file. + * gdb.reverse/solib-reverse.exp: Use standard_testfile, + standard_output_file. + * gdb.reverse/step-precsave.exp: Use standard_testfile. + * gdb.reverse/step-reverse.exp: Use standard_testfile. + * gdb.reverse/until-precsave.exp: Use standard_testfile. + * gdb.reverse/until-reverse.exp: Use standard_testfile. + * gdb.reverse/watch-precsave.exp: Use standard_testfile. + * gdb.reverse/watch-reverse.exp: Use standard_testfile. + 2012-06-26 Tom Tromey * gdb.stabs/weird.exp: Remove directory-checking code. Use diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp index 54c3840b174..e98be980cc8 100644 --- a/gdb/testsuite/gdb.reverse/break-precsave.exp +++ b/gdb/testsuite/gdb.reverse/break-precsave.exp @@ -21,8 +21,7 @@ if ![supports_process_record] { return } -set testfile "break-reverse" -set srcfile ${testfile}.c +standard_testfile break-reverse.c if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/break-reverse.exp b/gdb/testsuite/gdb.reverse/break-reverse.exp index 0601501ed8d..c9ce3453210 100644 --- a/gdb/testsuite/gdb.reverse/break-reverse.exp +++ b/gdb/testsuite/gdb.reverse/break-reverse.exp @@ -20,8 +20,7 @@ if ![supports_reverse] { return } -set testfile "break-reverse" -set srcfile ${testfile}.c +standard_testfile if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp index a4f575e1393..12e71e77854 100644 --- a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp +++ b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp @@ -21,8 +21,7 @@ if ![supports_process_record] { return } -set testfile "consecutive-reverse" -set srcfile ${testfile}.c +standard_testfile consecutive-reverse.c if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/consecutive-reverse.exp b/gdb/testsuite/gdb.reverse/consecutive-reverse.exp index a7445e9699b..06433a01769 100644 --- a/gdb/testsuite/gdb.reverse/consecutive-reverse.exp +++ b/gdb/testsuite/gdb.reverse/consecutive-reverse.exp @@ -20,8 +20,7 @@ if ![supports_reverse] { return } -set testfile "consecutive-reverse" -set srcfile ${testfile}.c +standard_testfile if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/finish-precsave.exp b/gdb/testsuite/gdb.reverse/finish-precsave.exp index 661a07e7dcf..a24486ee837 100644 --- a/gdb/testsuite/gdb.reverse/finish-precsave.exp +++ b/gdb/testsuite/gdb.reverse/finish-precsave.exp @@ -20,8 +20,7 @@ if ![supports_reverse] { return } -set testfile "finish-reverse" -set srcfile ${testfile}.c +standard_testfile finish-reverse.c if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp b/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp index 02f1e19fd74..ab7978a7ba6 100644 --- a/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp +++ b/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp @@ -23,8 +23,7 @@ if ![supports_reverse] { return } -set testfile "finish-reverse-bkpt" -set srcfile finish-reverse.c +standard_testfile finish-reverse.c if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/finish-reverse.exp b/gdb/testsuite/gdb.reverse/finish-reverse.exp index 97dc6894c94..0d09e6e1cda 100644 --- a/gdb/testsuite/gdb.reverse/finish-reverse.exp +++ b/gdb/testsuite/gdb.reverse/finish-reverse.exp @@ -20,8 +20,7 @@ if ![supports_reverse] { return } -set testfile "finish-reverse" -set srcfile ${testfile}.c +standard_testfile if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp index 760225fdd57..d1fcd8b2091 100644 --- a/gdb/testsuite/gdb.reverse/i386-precsave.exp +++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp @@ -30,27 +30,19 @@ if ![istarget "i?86-*linux*"] then { return } -set testfile "i386-precsave" -set srcfile i386-reverse.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile i386-reverse.c # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { - untested ${testfile}.exp +if {[prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug $additional_flags]]} { return -1 } set end_of_main [gdb_get_line_number " end of main "] set end_of_inc_dec_tests [gdb_get_line_number " end inc_dec_tests "] -# Get things started. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} runto main if [supports_process_record] { diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp index 8a4e9b35724..81dccef4843 100644 --- a/gdb/testsuite/gdb.reverse/i386-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp @@ -29,27 +29,19 @@ if ![istarget "i?86-*linux*"] then { return } -set testfile "i386-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { - untested i386-reverse +if {[prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug $additional_flags]]} { return -1 } set end_of_main [gdb_get_line_number " end of main "] set end_of_inc_dec_tests [gdb_get_line_number " end inc_dec_tests "] -# Get things started. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} runto main if [supports_process_record] { diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp index 97afd1e4670..6bc21c9daaf 100644 --- a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp @@ -29,15 +29,13 @@ if ![istarget "*86*-*linux*"] then { return } -set testfile "i386-sse-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { - untested i386-sse-reverse +if {[prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug $additional_flags]]} { return -1 } @@ -46,12 +44,6 @@ set end_sse_test [gdb_get_line_number " end sse_test "] set end_ssse3_test [gdb_get_line_number " end ssse3_test "] set end_sse4_test [gdb_get_line_number " end sse4_test "] -# Get things started. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} runto main if [supports_process_record] { diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp index 0a105fd123b..3e9774a2548 100644 --- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp @@ -21,24 +21,16 @@ if ![istarget "i?86-*linux*"] then { return } -set testfile "i387-env-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { - untested ${testfile}.exp +if {[prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug $additional_flags]]} { return -1 } -# Get things started. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} runto main # Record to end of main diff --git a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp index 98bc7125a8b..79b7945cc07 100644 --- a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp @@ -21,24 +21,16 @@ if ![istarget "i?86-*linux*"] then { return } -set testfile "i387-stack-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { - untested ${testfile}.exp +if {[prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug $additional_flags]]} { return -1 } -# Get things started. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} runto main # Record to end of main diff --git a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp index 944946dde57..5f7745a7e5a 100644 --- a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp +++ b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp @@ -40,11 +40,10 @@ if ![supports_process_record] { return } -set testfile "machinestate" -set srcfile ${testfile}.c -set srcfile1 ms1.c +standard_testfile machinestate.c ms1.c -if { [prepare_for_testing $testfile.exp $testfile {machinestate.c ms1.c} ] } { +if { [prepare_for_testing $testfile.exp $testfile \ + [list $srcfile $srcfile2]] } { return -1 } diff --git a/gdb/testsuite/gdb.reverse/machinestate.exp b/gdb/testsuite/gdb.reverse/machinestate.exp index 67c4cd69824..2b20a5312cd 100644 --- a/gdb/testsuite/gdb.reverse/machinestate.exp +++ b/gdb/testsuite/gdb.reverse/machinestate.exp @@ -39,11 +39,10 @@ if ![supports_reverse] { return } -set testfile "machinestate" -set srcfile ${testfile}.c -set srcfile1 ms1.c +standard_testfile .c ms1.c -if { [prepare_for_testing $testfile.exp $testfile {machinestate.c ms1.c} ] } { +if { [prepare_for_testing $testfile.exp $testfile \ + [list $srcfile $srcfile2]] } { return -1 } diff --git a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp index 93acc0710cf..c4f96af6749 100644 --- a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp +++ b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp @@ -27,8 +27,7 @@ if ![supports_reverse] { return } -set testfile "next-reverse-bkpt-over-sr" -set srcfile step-reverse.c +standard_testfile step-reverse.c if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index 8145da2d987..6c717d81a3e 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -27,12 +27,10 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -set testfile sigall-precsave -set srcfile sigall-reverse.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested ${testfile}.exp - return -1 +standard_testfile sigall-reverse.c + +if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { + return -1 } # Make the first signal SIGABRT because it is always supported. diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp index 791233db1bb..598e5d45793 100644 --- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp +++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp @@ -27,12 +27,10 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -set testfile sigall-reverse -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested ${testfile}.exp - return -1 +standard_testfile + +if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { + return -1 } # Make the first signal SIGABRT because it is always supported. diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp index 01e6ea1fcb6..7e60ebdc495 100644 --- a/gdb/testsuite/gdb.reverse/solib-precsave.exp +++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp @@ -21,12 +21,10 @@ if ![supports_process_record] { return } -set testfile "solib-reverse" -set srcfile ${testfile}.c +standard_testfile solib-reverse.c set libfile "shr2" set libsrc ${libfile}.c -set library ${objdir}/${subdir}/${libfile}.sl -set binfile ${objdir}/${subdir}/${testfile} +set library [standard_output_file ${libfile}.sl] if [get_compiler_info] { return -1 diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.exp b/gdb/testsuite/gdb.reverse/solib-reverse.exp index 03bb1756fcf..d878a7f6220 100644 --- a/gdb/testsuite/gdb.reverse/solib-reverse.exp +++ b/gdb/testsuite/gdb.reverse/solib-reverse.exp @@ -20,12 +20,10 @@ if ![supports_reverse] { return } -set testfile "solib-reverse" -set srcfile ${testfile}.c +standard_testfile set libfile "shr2" set libsrc ${libfile}.c -set library ${objdir}/${subdir}/${libfile}.sl -set binfile ${objdir}/${subdir}/${testfile} +set library [standard_output_file ${libfile}.sl] if [get_compiler_info] { return -1 diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp index 529d3c0722d..e93bea4cea8 100644 --- a/gdb/testsuite/gdb.reverse/step-precsave.exp +++ b/gdb/testsuite/gdb.reverse/step-precsave.exp @@ -25,8 +25,7 @@ if ![supports_process_record] { return } -set testfile "step-reverse" -set srcfile ${testfile}.c +standard_testfile step-reverse.c if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp index 8fd6c126506..331b3a8ce76 100644 --- a/gdb/testsuite/gdb.reverse/step-reverse.exp +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp @@ -24,8 +24,7 @@ if ![supports_reverse] { return } -set testfile "step-reverse" -set srcfile ${testfile}.c +standard_testfile if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index 903bbc15d6e..5f471ffd795 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -21,17 +21,16 @@ if ![supports_process_record] { return } -set testfile "until-reverse" -set srcfile ${testfile}.c -set srcfile1 ur1.c +standard_testfile until-reverse.c ur1.c -if { [prepare_for_testing $testfile.exp $testfile {until-reverse.c ur1.c} ] } { +if { [prepare_for_testing $testfile.exp $testfile \ + [list $srcfile $srcfile2]] } { return -1 } set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile1"] +set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile2"] set bp_location19 [gdb_get_line_number "set breakpoint 19 here"] set bp_location20 [gdb_get_line_number "set breakpoint 20 here"] set bp_location21 [gdb_get_line_number "set breakpoint 21 here"] @@ -95,7 +94,7 @@ gdb_test "finish" \ # Advance to a function called by main (marker2) # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile1:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location9.*" \ "advance to marker2" # Now issue an until with another function, not called by the current @@ -126,7 +125,7 @@ gdb_test_no_output "set exec-dir reverse" "set reverse execution" # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile1:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location9.*" \ "reverse-advance to marker2" # Finish out to main scope (backward) diff --git a/gdb/testsuite/gdb.reverse/until-reverse.exp b/gdb/testsuite/gdb.reverse/until-reverse.exp index f59c3a5f18f..51d836a8e5e 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.exp +++ b/gdb/testsuite/gdb.reverse/until-reverse.exp @@ -20,17 +20,16 @@ if ![supports_reverse] { return } -set testfile "until-reverse" -set srcfile ${testfile}.c -set srcfile1 ur1.c +standard_testfile .c ur1.c -if { [prepare_for_testing $testfile.exp $testfile {until-reverse.c ur1.c} ] } { +if { [prepare_for_testing $testfile.exp $testfile \ + [list $srcfile $srcfile2]] } { return -1 } set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile1"] +set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile2"] set bp_location19 [gdb_get_line_number "set breakpoint 19 here"] set bp_location20 [gdb_get_line_number "set breakpoint 20 here"] set bp_location21 [gdb_get_line_number "set breakpoint 21 here"] @@ -71,7 +70,7 @@ gdb_test "finish" \ # Advance to a function called by main (marker2) # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile1:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location9.*" \ "advance to marker2" # Now issue an until with another function, not called by the current @@ -102,7 +101,7 @@ gdb_test_no_output "set exec-dir reverse" "set reverse execution" # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile1:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location9.*" \ "reverse-advance to marker2" # Finish out to main scope (backward) diff --git a/gdb/testsuite/gdb.reverse/watch-precsave.exp b/gdb/testsuite/gdb.reverse/watch-precsave.exp index 054b7c2074c..441a25146b3 100644 --- a/gdb/testsuite/gdb.reverse/watch-precsave.exp +++ b/gdb/testsuite/gdb.reverse/watch-precsave.exp @@ -22,9 +22,7 @@ if ![supports_process_record] { return } -set testfile "watch-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile watch-reverse.c if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.reverse/watch-reverse.exp b/gdb/testsuite/gdb.reverse/watch-reverse.exp index 78b3f404595..ca31b4cb48b 100644 --- a/gdb/testsuite/gdb.reverse/watch-reverse.exp +++ b/gdb/testsuite/gdb.reverse/watch-reverse.exp @@ -22,9 +22,7 @@ if ![supports_reverse] { return } -set testfile "watch-reverse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { return -1 -- 2.30.2