aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.reverse
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-26 17:54:59 +0000
committerTom Tromey <tromey@redhat.com>2012-06-26 17:54:59 +0000
commit7686c074591882316c738d09af170b43f42f3ffe (patch)
tree6635c29dfaea4cdba4d7dc1ceb733ebc1cd639d8 /gdb/testsuite/gdb.reverse
parent481fc10041dc81c3664cfc67083504e35e31b289 (diff)
downloadgdb-7686c074591882316c738d09af170b43f42f3ffe.zip
gdb-7686c074591882316c738d09af170b43f42f3ffe.tar.gz
gdb-7686c074591882316c738d09af170b43f42f3ffe.tar.bz2
* 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.
Diffstat (limited to 'gdb/testsuite/gdb.reverse')
-rw-r--r--gdb/testsuite/gdb.reverse/break-precsave.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/break-reverse.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/consecutive-precsave.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/consecutive-reverse.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/finish-precsave.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/finish-reverse.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/i386-precsave.exp14
-rw-r--r--gdb/testsuite/gdb.reverse/i386-reverse.exp14
-rw-r--r--gdb/testsuite/gdb.reverse/i386-sse-reverse.exp14
-rw-r--r--gdb/testsuite/gdb.reverse/i387-env-reverse.exp14
-rw-r--r--gdb/testsuite/gdb.reverse/i387-stack-reverse.exp14
-rw-r--r--gdb/testsuite/gdb.reverse/machinestate-precsave.exp7
-rw-r--r--gdb/testsuite/gdb.reverse/machinestate.exp7
-rw-r--r--gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/sigall-precsave.exp10
-rw-r--r--gdb/testsuite/gdb.reverse/sigall-reverse.exp10
-rw-r--r--gdb/testsuite/gdb.reverse/solib-precsave.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/solib-reverse.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/step-precsave.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/step-reverse.exp3
-rw-r--r--gdb/testsuite/gdb.reverse/until-precsave.exp13
-rw-r--r--gdb/testsuite/gdb.reverse/until-reverse.exp13
-rw-r--r--gdb/testsuite/gdb.reverse/watch-precsave.exp4
-rw-r--r--gdb/testsuite/gdb.reverse/watch-reverse.exp4
25 files changed, 57 insertions, 123 deletions
diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp
index 54c3840..e98be98 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 0601501..c9ce345 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 a4f575e..12e71e7 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 a7445e9..06433a0 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 661a07e..a24486e 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 02f1e19..ab7978a 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 97dc689..0d09e6e 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 760225f..d1fcd8b 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 8a4e9b3..81dccef 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 97afd1e..6bc21c9 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 0a105fd..3e9774a 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 98bc712..79b7945 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 944946d..5f7745a 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 67c4cd6..2b20a53 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 93acc07..c4f96af 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 8145da2..6c717d8 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 791233d..598e5d4 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 01e6ea1..7e60ebd 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 03bb175..d878a7f 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 529d3c0..e93bea4 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 8fd6c12..331b3a8 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 903bbc1..5f471ff 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 f59c3a5..51d836a 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 054b7c2..441a251 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 78b3f40..ca31b4c 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