diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 23 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-byte.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-disp-step.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-dword.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-entry-value-param.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-entry-value.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-word.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-avx.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-byte.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-disp-step.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-dr3-watch.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-permbkpt.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-signal.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-size-overlap.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-sse.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-unwind.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-word.exp | 9 |
18 files changed, 53 insertions, 85 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 59fcf90e767..fa1b3214c75 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,28 @@ 2013-08-22 Tom Tromey <tromey@redhat.com> + * gdb.arch/amd64-byte.exp: Use standard_testfile, + clean_restart. + * gdb.arch/amd64-disp-step.exp: Use standard_testfile. + * gdb.arch/amd64-dword.exp: Use standard_testfile, + clean_restart. + * gdb.arch/amd64-entry-value-param.exp: Use standard_testfile. + * gdb.arch/amd64-entry-value.exp: Use standard_testfile. + * gdb.arch/amd64-prologue-xmm.exp: Use standard_testfile. + * gdb.arch/amd64-word.exp: Use standard_testfile, + clean_restart. + * gdb.arch/i386-avx.exp: Use standard_testfile, clean_restart. + * gdb.arch/i386-byte.exp: Use standard_testfile, clean_restart. + * gdb.arch/i386-disp-step.exp: Use standard_testfile. + * gdb.arch/i386-dr3-watch.exp: Use standard_testfile. + * gdb.arch/i386-permbkpt.exp: Use standard_testfile, clean_restart. + * gdb.arch/i386-signal.exp: Use standard_testfile. + * gdb.arch/i386-size-overlap.exp: Use standard_testfile, clean_restart. + * gdb.arch/i386-sse.exp: Use standard_testfile, clean_restart. + * gdb.arch/i386-unwind.exp: Use standard_testfile. + * gdb.arch/i386-word.exp: Use standard_testfile, clean_restart. + +2013-08-22 Tom Tromey <tromey@redhat.com> + * gdb.python/py-error.exp: Use gdb_remote_download. * gdb.python/py-mi.exp: Use gdb_remote_download. * gdb.python/py-objfile-script.exp: Use standard_output_file. diff --git a/gdb/testsuite/gdb.arch/amd64-byte.exp b/gdb/testsuite/gdb.arch/amd64-byte.exp index 0b908fa41ee..c4774e6516b 100644 --- a/gdb/testsuite/gdb.arch/amd64-byte.exp +++ b/gdb/testsuite/gdb.arch/amd64-byte.exp @@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { return } -set testfile "amd64-byte" -set srcfile amd64-pseudo.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile amd64-pseudo.c if [get_compiler_info] { return -1 @@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp b/gdb/testsuite/gdb.arch/amd64-disp-step.exp index 14a65d33ad1..1ad39cc6bd8 100644 --- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp +++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp @@ -25,9 +25,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { set newline "\[\r\n\]*" -set testfile "amd64-disp-step" -set srcfile ${testfile}.S -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .S set additional_flags "-Wa,-g" diff --git a/gdb/testsuite/gdb.arch/amd64-dword.exp b/gdb/testsuite/gdb.arch/amd64-dword.exp index 7b5cab75409..759cd0e56ae 100644 --- a/gdb/testsuite/gdb.arch/amd64-dword.exp +++ b/gdb/testsuite/gdb.arch/amd64-dword.exp @@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { return } -set testfile "amd64-dword" -set srcfile amd64-pseudo.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile amd64-pseudo.c if [get_compiler_info] { return -1 @@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp index 4197ed8c412..e44b6ff8b7f 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp @@ -13,14 +13,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -set testfile amd64-entry-value-param -set srcfile ${testfile}.S -set csrcfile ${testfile}.c +standard_testfile .S .c set opts {} if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1" - set srcfile ${csrcfile} + set srcfile ${srcfile2} lappend opts debug optimize=-O2 } elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { verbose "Skipping amd64-entry-value-param." @@ -35,7 +33,7 @@ if ![runto_main] { return -1 } -set srcfile $csrcfile +set srcfile $srcfile2 gdb_breakpoint [gdb_get_line_number "break-here"] gdb_continue_to_breakpoint "break-here" ".* break-here .*" diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp index df6cb270d76..2393a717f31 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp @@ -13,8 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -set testfile amd64-entry-value -set srcfile ${testfile}.s +standard_testfile .s set opts {} if [info exists COMPILE] { diff --git a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp index 28ad9b48983..6fafa26fee2 100644 --- a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp +++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp @@ -15,10 +15,9 @@ # Test GCC PR debug/48827 workaround in GDB. -set testfile "amd64-prologue-xmm" -set srcfile ${testfile}.s +standard_testfile .s +set csrcfile [file rootname $srcfile].c set csrcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile}.x set opts {} if [info exists COMPILE] { @@ -30,7 +29,7 @@ if [info exists COMPILE] { return 0 } -if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} { +if {[prepare_for_testing ${testfile}.exp ${binfile} $srcfile $opts]} { return -1 } diff --git a/gdb/testsuite/gdb.arch/amd64-word.exp b/gdb/testsuite/gdb.arch/amd64-word.exp index 7009b165a01..101716de7c6 100644 --- a/gdb/testsuite/gdb.arch/amd64-word.exp +++ b/gdb/testsuite/gdb.arch/amd64-word.exp @@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { return } -set testfile "amd64-word" -set srcfile amd64-pseudo.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile amd64-pseudo.c if [get_compiler_info] { return -1 @@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp index bbbc6f4ed4f..1ee14378d95 100644 --- a/gdb/testsuite/gdb.arch/i386-avx.exp +++ b/gdb/testsuite/gdb.arch/i386-avx.exp @@ -24,9 +24,7 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } { return } -set testfile "i386-avx" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .c if [get_compiler_info] { return -1 @@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/i386-byte.exp b/gdb/testsuite/gdb.arch/i386-byte.exp index 94d0b40b0ca..9a0a778a320 100644 --- a/gdb/testsuite/gdb.arch/i386-byte.exp +++ b/gdb/testsuite/gdb.arch/i386-byte.exp @@ -24,9 +24,7 @@ if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then { return } -set testfile "i386-byte" -set srcfile i386-pseudo.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile i386-pseudo.c if [get_compiler_info] { return -1 @@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp index 8d3d5b85a35..812902c0611 100644 --- a/gdb/testsuite/gdb.arch/i386-disp-step.exp +++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp @@ -23,9 +23,7 @@ if { ![is_x86_like_target] } then { return } -set testfile "i386-disp-step" -set srcfile ${testfile}.S -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .S set additional_flags "-Wa,-g" diff --git a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp index 81e33bc0e7f..b51c26c836c 100644 --- a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp +++ b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp @@ -23,10 +23,9 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then { return 0 } -set testfile "i386-dr3-watch" -set srcfile ${testfile}.c +standard_testfile -if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug $additional_flags}] { +if [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile} {debug $additional_flags}] { untested "failed to compile ${testfile}" return -1 } diff --git a/gdb/testsuite/gdb.arch/i386-permbkpt.exp b/gdb/testsuite/gdb.arch/i386-permbkpt.exp index 81ee4932b29..88bfff343a8 100644 --- a/gdb/testsuite/gdb.arch/i386-permbkpt.exp +++ b/gdb/testsuite/gdb.arch/i386-permbkpt.exp @@ -23,9 +23,7 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then { return } -set testfile "i386-permbkpt" -set srcfile ${testfile}.S -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .S # some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] @@ -35,10 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} gdb_test "break main" "" "First permanent break" gdb_test "break main" "" "Second permanent break" diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp index 987941c8ba8..1c0a901323b 100644 --- a/gdb/testsuite/gdb.arch/i386-signal.exp +++ b/gdb/testsuite/gdb.arch/i386-signal.exp @@ -20,9 +20,7 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then { return } -set testfile "i386-signal" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable { debug }] != "" } { diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp index 66ed3039db5..d65ec702287 100644 --- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp +++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp @@ -22,9 +22,7 @@ if { ![is_x86_like_target] } then { return } -set testfile "i386-size-overlap" -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] diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp index c62a3a0b86e..773c7ff9777 100644 --- a/gdb/testsuite/gdb.arch/i386-sse.exp +++ b/gdb/testsuite/gdb.arch/i386-sse.exp @@ -24,9 +24,7 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } { return } -set testfile "i386-sse" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .c if [get_compiler_info] { return -1 @@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp index c6c0ee5fa0d..d0740db0a63 100644 --- a/gdb/testsuite/gdb.arch/i386-unwind.exp +++ b/gdb/testsuite/gdb.arch/i386-unwind.exp @@ -26,9 +26,7 @@ if { ![is_x86_like_target] } then { return } -set testfile "i386-unwind" -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] diff --git a/gdb/testsuite/gdb.arch/i386-word.exp b/gdb/testsuite/gdb.arch/i386-word.exp index 5ca41593304..b19ce4002ed 100644 --- a/gdb/testsuite/gdb.arch/i386-word.exp +++ b/gdb/testsuite/gdb.arch/i386-word.exp @@ -24,9 +24,7 @@ if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then { return } -set testfile "i386-word" -set srcfile i386-pseudo.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile i386-pseudo.c if [get_compiler_info] { return -1 @@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} if ![runto_main] then { gdb_suppress_tests |