* 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 <tromey@redhat.com>
+
+ * 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 <tromey@redhat.com>
* gdb.stabs/weird.exp: Remove directory-checking code. Use
return
}
-set testfile "break-reverse"
-set srcfile ${testfile}.c
+standard_testfile break-reverse.c
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
return
}
-set testfile "break-reverse"
-set srcfile ${testfile}.c
+standard_testfile
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
return
}
-set testfile "consecutive-reverse"
-set srcfile ${testfile}.c
+standard_testfile consecutive-reverse.c
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
return
}
-set testfile "consecutive-reverse"
-set srcfile ${testfile}.c
+standard_testfile
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
return
}
-set testfile "finish-reverse"
-set srcfile ${testfile}.c
+standard_testfile finish-reverse.c
if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } {
return -1
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
return
}
-set testfile "finish-reverse"
-set srcfile ${testfile}.c
+standard_testfile
if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } {
return -1
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] {
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] {
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
}
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] {
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
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
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
}
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
}
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
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.
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.
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
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
return
}
-set testfile "step-reverse"
-set srcfile ${testfile}.c
+standard_testfile step-reverse.c
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
return
}
-set testfile "step-reverse"
-set srcfile ${testfile}.c
+standard_testfile
if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
return -1
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"]
# 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
#
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)
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"]
# 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
#
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)
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
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