]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
test suite update - gdb.base/[cd]
authorTom Tromey <tromey@redhat.com>
Thu, 27 Jun 2013 18:49:03 +0000 (18:49 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 27 Jun 2013 18:49:03 +0000 (18:49 +0000)
Convert files gdb.base/[cd]*.exp to use standard_output_file et al.

* call-ar-st.exp, call-rt-st.exp, call-sc.exp,
call-signal-resume.exp, call-strs.exp, callexit.exp,
callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
commands.exp, completion.exp, complex.exp, cond-expr.exp,
condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.

36 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-sc.exp
gdb/testsuite/gdb.base/call-signal-resume.exp
gdb/testsuite/gdb.base/call-strs.exp
gdb/testsuite/gdb.base/callexit.exp
gdb/testsuite/gdb.base/callfuncs.exp
gdb/testsuite/gdb.base/catch-load.exp
gdb/testsuite/gdb.base/catch-syscall.exp
gdb/testsuite/gdb.base/charset.exp
gdb/testsuite/gdb.base/checkpoint.exp
gdb/testsuite/gdb.base/chng-syms.exp
gdb/testsuite/gdb.base/code-expr.exp
gdb/testsuite/gdb.base/code_elim.exp
gdb/testsuite/gdb.base/commands.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/complex.exp
gdb/testsuite/gdb.base/cond-expr.exp
gdb/testsuite/gdb.base/condbreak.exp
gdb/testsuite/gdb.base/consecutive.exp
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/corefile.exp
gdb/testsuite/gdb.base/ctxobj.exp
gdb/testsuite/gdb.base/cursal.exp
gdb/testsuite/gdb.base/cvexpr.exp
gdb/testsuite/gdb.base/dbx.exp
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.base/define.exp
gdb/testsuite/gdb.base/del.exp
gdb/testsuite/gdb.base/detach.exp
gdb/testsuite/gdb.base/dfp-test.exp
gdb/testsuite/gdb.base/display.exp
gdb/testsuite/gdb.base/dmsym.exp
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/dup-sect.exp

index c022aec7afce5cddd669027bb125cd6eadac5b35..f4d180e462251f880288992e18d88cb93f662d21 100644 (file)
@@ -1,3 +1,16 @@
+2013-06-27  Tom Tromey  <tromey@redhat.com>
+
+       * call-ar-st.exp, call-rt-st.exp, call-sc.exp,
+       call-signal-resume.exp, call-strs.exp, callexit.exp,
+       callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
+       checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
+       commands.exp, completion.exp, complex.exp, cond-expr.exp,
+       condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
+       ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
+       define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
+       dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
+       standard_output_file, prepare_for_testing, clean_restart.
+
 2013-06-27  Tom Tromey  <tromey@redhat.com>
 
        * a2-run.exp, all-bin.exp, annota1.exp, annota3.exp, anon.exp,
index 925d2af33792e586d5660d36052ed9086807d368..21df59d6b31e5985352d800fb8707904f1bda92e 100644 (file)
 
 
 
-set testfile "call-ar-st"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Test depends on printf, which the sparclet stub doesn't support.  
 if { [istarget "sparclet-*-*"] } {
     return 0
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
-    return -1
+# Some targets can't call functions, so don't even bother with this
+# test.
+if [target_info exists gdb,cannot_call_functions] {
+    setup_xfail "*-*-*" 2416
+    fail "This target can not call functions"
+    continue
 }
 
-
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
 
@@ -39,23 +39,15 @@ if [get_compiler_info] {
     return -1
 }
 
-# Some targets can't call functions, so don't even bother with this
-# test.
-if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
-    continue
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+    untested $testfile.exp
+    return -1
 }
 
+
 set oldtimeout $timeout
 set timeout [expr "$timeout + 60"]
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
 gdb_test_no_output "set width 0"
index d71824c4f23714f6066d84881dbc5b0119b6ce8d..f01a18f70906add0b97c1dc72353b459276594da 100644 (file)
 
 
 
-set testfile "call-rt-st"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
+standard_testfile .c
 
 # Test depends on printf, which the sparclet stub doesn't support.  
 if { [istarget "sparclet-*-*"] } {
@@ -55,10 +52,7 @@ if [target_info exists gdb,cannot_call_functions] {
 
 # Start with a fresh gdb.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
 gdb_test_no_output "set width 0"
index e62021b756fc64b8f51c3713725375f487b034df..d3bd8ada0e7f5633d5b55443a94c2a6fa5b8cf66 100644 (file)
@@ -28,9 +28,7 @@ if [target_info exists gdb,cannot_call_functions] {
     continue
 }
 
-set testfile "call-sc"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 # Create and source the file that provides information about the
 # compiler used to compile the test case.
@@ -47,7 +45,6 @@ proc start_scalars_test { type } {
     global testfile
     global srcfile
     global binfile
-    global objdir
     global subdir
     global srcdir
     global gdb_prompt
@@ -57,7 +54,7 @@ proc start_scalars_test { type } {
     set flags "debug additional_flags=-DT=${type}"
     set testfile "call-sc-${type}"
 
-    set binfile ${objdir}/${subdir}/${testfile}
+    set binfile [standard_output_file ${testfile}]
     if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
        # built the second test case since we can't use prototypes
        warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
index b7c4c0be3fd06b23958b0a2989d55f96ff7effab..656e8dc15c868956dbc56a62ec33d80632c08324 100644 (file)
@@ -31,9 +31,7 @@ if [target_info exists gdb,nosignals] {
 }
 
 
-set testfile "call-signals"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile call-signals.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested call-signal-resume.exp
@@ -61,10 +59,7 @@ proc get_dummy_frame_number { } {
 
 # Start with a fresh gdb.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if { ![runto_main] } {
     fail "Can't run to main"
index 37a282889f087c2d75dba44ada6124b7edb94778..764912a858e339fea968ac2107fd5d333f63192c 100644 (file)
 #debug strarg
 
 
-set testfile "call-strs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Test depends on printf, which the sparclet stub doesn't support.  
 if { [istarget "sparclet-*-*"] } {
     return 0
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested call-strs.exp
-    return -1
-}
-
-
-
 # Some targets can't call functions, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
@@ -48,12 +39,11 @@ if [target_info exists gdb,cannot_call_functions] {
 }
 
 
-# Start with a fresh gdb.
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+    untested $testfile.exp
+    return -1
+}
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
 gdb_test_no_output "set print symbol off"
index 87d2d91eed9111d4fe7ca6bdb1f82d29aceadc08..e33d5f76e66296202ba1bccd5963667242616553 100644 (file)
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-set testfile "callexit"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested callexit.exp
@@ -33,10 +31,7 @@ if [target_info exists gdb,cannot_call_functions] {
 
 # Start with a fresh gdb.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if { ![runto_main] } {
     fail "Can't run to main"
index 6e1ebab9e7742bbb22bb193b46d14735dd6ba2a6..e3f49f98b1752a2dcab103d5cd7a097aaf873014 100644 (file)
@@ -16,9 +16,7 @@
 # This file was written by Fred Fish. (fnf@cygnus.com)
 # and modified by Bob Manson. (manson@cygnus.com)
 
-set testfile "callfuncs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 set compile_flags {debug}
 if [support_complex_tests] {
index c66318e7414c33c76c7774d6b086c10357f71691..4bcaa44d696f0eb518589b8615062d484edf29f5 100644 (file)
@@ -24,9 +24,7 @@ if {[get_compiler_info]} {
     return -1
 }
 
-set testfile catch-load
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
     untested catch-load.exp
     return -1
@@ -34,7 +32,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 
 set testfile2 catch-load-so
 set srcfile2 ${testfile2}.c
-set binfile2 ${objdir}/${subdir}/${testfile2}.so
+set binfile2 [standard_output_file ${testfile2}.so]
 set binfile2_dlopen [shlib_target_file ${testfile2}.so]
 if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
     untested catch-load.exp
index 4a05292e55330e097d5605548896b2791543317c..395fcd44783a1a0dd6416efd53cf19b5487a6f96 100644 (file)
@@ -38,10 +38,7 @@ if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
      continue
 }
 
-global srcfile
-set testfile "catch-syscall"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # All (but the last) syscalls from the example code
 # They are ordered according to the file, so do not change this.
index d8d471ec2555d4b2b6c4dfddd69dfa21bafd4778..a5dbb2891eab184b295509bcb6578eefdbe51d0a 100644 (file)
 # Test GDB's character set support.
 
 
-set testfile "charset"
-set srcfile ${testfile}.c
-set srcmallocfile ${testfile}-malloc.c
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcmallocfile]] } {
+standard_testfile .c charset-malloc.c
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcfile2]] } {
     return -1
 }
 
index d9c28e0647047352af93bc89b9c24426b684af8d..b86fead462bab2c4e8e66d1f0577f94ec051e062 100644 (file)
@@ -25,9 +25,7 @@ if {![istarget "*-*-linux*"]} then {
 }
 
 
-set testfile "checkpoint"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested checkpoint.exp
@@ -36,10 +34,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 
 # Start with a fresh gdb
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 global gdb_prompt
 
index 8ae039076cabdaadb20cb9adb879e9c9f3f76024..d729f1ac49b6b929d85c24b7fd2011ec16071c98 100644 (file)
@@ -18,9 +18,7 @@
 # Test that GDB cleans up properly after errors that result when a 
 # breakpoint is reset. 
 
-set testfile "chng-syms"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } {
     untested chng-syms.exp
@@ -53,10 +51,7 @@ proc expect_to_stop_here { ident } {
     return 1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 gdb_test "break stop_here if (var1 == 42)" \
     "Breakpoint.*at.* file .*$srcfile, line.*" \
index 529a699fd400301d42a9bf33c0cc08f1d8a94bd7..de2f03aa43d8b69c7a3a3ea590fc45a306de9e78 100644 (file)
 # test running programs
 #
 
-set testfile "cvexpr"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile cvexpr.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested code-expr.exp
      return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
index 4be9200dc1928411dd7336d1530ac4d463abfe6a..c6030774ea0baa9dbe1929fc8b3a086002e0acd1 100644 (file)
@@ -20,8 +20,8 @@ set testfile1 code_elim1
 set testfile2 code_elim2
 set srcfile1 ${testfile1}.c
 set srcfile2 ${testfile2}.c
-set binfile1 ${objdir}/${subdir}/${testfile1}
-set binfile2 ${objdir}/${subdir}/${testfile2}
+set binfile1 [standard_output_file ${testfile1}]
+set binfile2 [standard_output_file ${testfile2}]
 set opts [list debug]
 lappend opts "additional_flags=-ffunction-sections"
 lappend opts "additional_flags=-fdata-sections"
index 39ad3f3575a3e0134252e194e592cf6e44a0513f..b608e0cf6a92e8de10e2bba44a6298da112e50f4 100644 (file)
@@ -17,6 +17,8 @@
 # test special commands (if, while, etc)
 #
 
+standard_testfile
+
 if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } {
     return -1
 }
@@ -555,7 +557,9 @@ proc stray_arg0_test { } {
 
 # Test that GDB is able to source a file with an indented comment.
 proc source_file_with_indented_comment {} {
-    set fd [open "file1" w]
+    set file1 [standard_output_file file1]
+
+    set fd [open "$file1" w]
     puts $fd \
 {define my_fun
     #indented comment
@@ -563,40 +567,44 @@ end
 echo Done!\n}
     close $fd
 
-    gdb_test "source file1" "Done!" "source file with indented comment"
+    gdb_test "source $file1" "Done!" "source file with indented comment"
 }
 
 # Test that GDB can handle arguments when sourcing files recursively.
 # If the arguments are overwritten with ####### then the test has failed.
 proc recursive_source_test {} {
-    set fd [open "file1" w]
+    set file1 [standard_output_file file1]
+    set file2 [standard_output_file file2]
+    set file3 [standard_output_file file3]
+
+    set fd [open "$file1" w]
     puts $fd \
-{source file2
-abcdef qwerty}
+"source $file2
+abcdef qwerty"
     close $fd
 
-    set fd [open "file2" w]
+    set fd [open "$file2" w]
     puts $fd \
-{define abcdef
-  echo 1: <<<$arg0>>>\n
-  source file3
-  echo 2: <<<$arg0>>>\n
-end}
+"define abcdef
+  echo 1: <<<\$arg0>>>\\n
+  source $file3
+  echo 2: <<<\$arg0>>>\\n
+end"
     close $fd
 
-    set fd [open "file3" w]
+    set fd [open "$file3" w]
     puts $fd \
 "echo in file3\\n
 #################################################################"
     close $fd
 
-    gdb_test "source file1" \
+    gdb_test "source $file1" \
        "1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
        "recursive source test"
 
-    file delete file1
-    file delete file2
-    file delete file3
+    file delete $file1
+    file delete $file2
+    file delete $file3
 }
 
 proc gdb_test_no_prompt { command result msg } {
index 80cfbff60ad79fd9997f080eacdd7b2978d58841..b3147da72a47644e270427295cea82468c16b974 100644 (file)
 # test running programs
 #
 
-set testfile "break"
-set srcfile ${testfile}.c
-set srcfile1 ${testfile}1.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
-     untested completion.exp
-     return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
-     untested completion.exp
-     return -1
-}
-
-if  { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested completion.exp
-     return -1
-}
+standard_testfile break.c break1.c
 
 if [get_compiler_info] {
     return -1
 }
 
-gdb_exit
-
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing $testfile.exp $testfile \
+        [list $srcfile $srcfile2] {debug nowarnings}]} {
+    untested $testfile.exp
+    return -1
+}
 
 if ![runto_main] then {
         perror "tests suppressed"
index 5cf4845817a93a5c858cb7be03be8bc8b3d3d66c..f29b4055441d337d722703442b71872b45a0bd1e 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-set testfile complex
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-set options debug
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options] != "" } {
-  # No support for __complex__, presumably.
-  unsupported "print complex packed value in C"
-  unsupported "print complex value in C"
-  return 0
-}
-
-# Start with a fresh gdb.
+standard_testfile
 
 if [get_compiler_info] {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+    untested $testfile.exp
+    return -1
+}
 
 if [runto f2] then {
     get_debug_format
index 95dbe03ab25e5ededfe78ab73660b926485d32d9..435884455cb4449770d4d1c96e88aee7c0239209 100644 (file)
 # haven't tried to compile one, or the compilation failed for some reason.
 # In either case, just notify the user and skip the tests in this file.
 
-set testfile "int-type"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile int-type.c
+
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
      untested cond-expr.exp
      return -1
     }
 
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 
 if ![runto_main] then {
index c09228cd52988270959bb599f2be4fb71f9d30ad..faccb5be30eb0b4d93fbc736b3a1a553d37dbb5c 100644 (file)
 # test running programs
 #
 
-set testfile "break"
-set srcfile ${testfile}.c
-set srcfile1 ${testfile}1.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
-     untested condbreak.exp
-     return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
-     untested condbreak.exp
-     return -1
-}
+standard_testfile break.c break1.c
 
-if  { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested condbreak.exp
-     return -1
+if {[prepare_for_testing ${testfile}.exp $testfile [list $srcfile $srcfile2] \
+        {debug nowarnings}]} {
+    return -1
 }
 
 if [get_compiler_info] {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 
 set bp_location1  [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location6  [gdb_get_line_number "set breakpoint 6 here"]
-set bp_location8  [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
-set bp_location9  [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
-set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
-set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
-set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
-set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
-set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
-set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
+set bp_location8  [gdb_get_line_number "set breakpoint 8 here" $srcfile2]
+set bp_location9  [gdb_get_line_number "set breakpoint 9 here" $srcfile2]
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2]
+set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2]
+set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2]
+set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
+set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2]
 
 #
 # test break at function
@@ -73,7 +57,7 @@ gdb_test "break main" \
 # test conditional break at function
 #
 gdb_test "break marker1 if 1==1" \
-    "Breakpoint.*at.* file .*$srcfile1, line.*"
+    "Breakpoint.*at.* file .*$srcfile2, line.*"
 
 gdb_test_no_output "delete 2"
 
@@ -89,7 +73,7 @@ gdb_test_no_output "delete 3"
 # test conditional break at function
 #
 gdb_test "break marker1 if (1==1)" \
-    "Breakpoint.*at.* file .*$srcfile1, line.*"
+    "Breakpoint.*at.* file .*$srcfile2, line.*"
 
 #
 # test conditional break at line number
@@ -98,16 +82,16 @@ gdb_test "break $srcfile:$bp_location1 if (1==1)" \
     "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
 
 gdb_test "break marker2 if (a==43)" \
-    "Breakpoint.*at.* file .*$srcfile1, line.*"
+    "Breakpoint.*at.* file .*$srcfile2, line.*"
 
 #
 # Check break involving inferior function call.
 # Ensure there is at least one additional breakpoint with higher VMA.
 #
 gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \
-    "Breakpoint.*at.* file .*$srcfile1, line.*"
+    "Breakpoint.*at.* file .*$srcfile2, line.*"
 gdb_test "break marker4" \
-    "Breakpoint.*at.* file .*$srcfile1, line.*"
+    "Breakpoint.*at.* file .*$srcfile2, line.*"
 
 #
 # check to see what breakpoints are set
@@ -129,15 +113,15 @@ if {$hp_aCC_compiler} {
 gdb_test "info break" \
     "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location6.*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker1$marker1_proto at .*$srcfile2:($bp_location15|$bp_location16).*
 \[\t \]+stop only if \\(1==1\\).*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location1.*
 \[\t \]+stop only if \\(1==1\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker2$marker2_proto at .*$srcfile2:($bp_location8|$bp_location9).*
 \[\t \]+stop only if \\(a==43\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker3$marker3_proto at .*$srcfile2:($bp_location17|$bp_location18).*
 \[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4$marker4_proto at .*$srcfile2:($bp_location13|$bp_location14).*" \
     "breakpoint info"
 
 
@@ -195,10 +179,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.
 #
 # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
 gdb_test_multiple "continue" "run until breakpoint at marker1" {
-    -re  "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
+    -re  "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
        pass "run until breakpoint at marker1"
     }
-    -re  "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
+    -re  "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
        xfail "run until breakpoint at marker1"
     }
 }
@@ -207,10 +191,10 @@ gdb_test_multiple "continue" "run until breakpoint at marker1" {
 # Same issues here as above.
 setup_xfail hppa2.0w-*-* 11512CLLbs
 gdb_test_multiple "continue" "run until breakpoint at marker2" {
-    -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
        pass "run until breakpoint at marker2"
     }
-    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
        xfail "run until breakpoint at marker2"
     }
 }
@@ -244,20 +228,20 @@ gdb_test "break *main if (1==1) ta 999" \
 
 set test "run until breakpoint at marker3"
 gdb_test_multiple "continue" $test {
-    -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
        pass $test
     }
-    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
        xfail $test
     }
 }
 
 set test "run until breakpoint at marker4"
 gdb_test_multiple "continue" $test {
-    -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
        pass $test
     }
-    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
+    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
        xfail $test
     }
 }
index dd29431bc74930a48a1836e2bf900ad6b4bedfc8..be70e9f1928a7060fd3a83850da4fdf2c908bd98 100644 (file)
 #
 
 
-set testfile "consecutive"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested consecutive.exp
+if [get_compiler_info] {
     return -1
 }
 
-if [get_compiler_info] {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
+    untested $testfile.exp
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto_main] then {
     perror "couldn't run to breakpoint"
     continue
index 0e073498bc78e49c4f9972595f5b5681b0956850..554e265b2177342260d7f90096e73ea26687dbc3 100644 (file)
@@ -27,9 +27,7 @@
 # test running programs
 #
 
-set testfile "constvars"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
@@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 
 #
index 054ed3e01cecc6a0d1376054e78938bd212397ed..24a33a3cf0c84a7c0fa533c69736dacec55233ed 100644 (file)
@@ -21,13 +21,7 @@ if ![isnative] then {
     return
 }
 
-set testfile "coremaker"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested corefile.exp
-     return -1
-}
+standard_testfile coremaker.c
 
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
@@ -35,6 +29,11 @@ if [get_compiler_info] {
     return -1
 }
 
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
+    untested $testfile.exp
+    return -1
+}
+
 set corefile [core_find $binfile {coremmap.data}]
 if {$corefile == ""} {
     return 0
@@ -49,7 +48,7 @@ if {$corefile == ""} {
 #
 # Another problem is that on some systems (solaris for example), there
 # is apparently a limit on the length of a fully specified path to 
-# the coremaker executable, at about 80 chars.  For this case, consider
+# the corefile executable, at about 80 chars.  For this case, consider
 # it a pass, but note that the program name is bad.
 
 gdb_exit
@@ -65,7 +64,7 @@ expect {
     -re "Couldn't find .* registers in core file.*$gdb_prompt $" {
         fail "args: -core=[file tail $corefile] (couldn't find regs)"
     }
-    -re "Core was generated by .*coremaker.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
+    -re "Core was generated by .*corefile.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
        pass "args: -core=[file tail $corefile]"
     }
     -re "Core was generated by .*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
@@ -93,7 +92,7 @@ if $verbose>1 then {
 
 eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile"
 expect {
-    -re "Core was generated by .*coremaker.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
+    -re "Core was generated by .*corefile.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
        pass "args: execfile -core=[file tail $corefile]"
     }
     -re "Core was generated by .*\r\n\#0  .*\(\).*\r\n$gdb_prompt $"    {
@@ -124,7 +123,7 @@ gdb_test_multiple "core-file $corefile" "core-file command" {
        send_gdb "y\n"
        exp_continue
     }
-    -re "Core was generated by .*coremaker.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
+    -re "Core was generated by .*corefile.*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
        pass "core-file command"
     }
     -re "Core was generated by .*\r\n\#0  .*\(\).*\r\n$gdb_prompt $" {
index cd68dfc41183e19f901889ebdba8194b29aa5fa4..f803a1260dd816b98e7241fac8edeaa5cb2b8856 100644 (file)
@@ -30,8 +30,8 @@ set executable ctxobj-m
 set libsrc [list "${srcdir}/${subdir}/ctxobj-v.c" \
                  "${srcdir}/${subdir}/ctxobj-f.c"]
 
-set libobj1 "${objdir}/${subdir}/libctxobj1.so"
-set libobj2 "${objdir}/${subdir}/libctxobj2.so"
+set libobj1 [standard_output_file libctxobj1.so]
+set libobj2 [standard_output_file libctxobj2.so]
 
 set libobj1_opts { debug additional_flags=-fPIC
                    additional_flags=-DVERSION=104
@@ -47,7 +47,7 @@ if { [gdb_compile_shlib $libsrc $libobj2 $libobj2_opts ] != "" } {
     return -1
 }
 if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \
-                  "${objdir}/${subdir}/${executable}" \
+                  [standard_output_file ${executable}] \
                   executable \
                   [list debug shlib=${libobj1} shlib=${libobj2}]]
      != ""} {
index a5840cb763766036e6a5ac2276466a8271281f4b..fb58dd4b771f5c00d7171208b4003f3dcab949e4 100644 (file)
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-set testfile "cursal"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
     untested "Couldn't compile $srcfile"
index 7ae8548b21ad983cbe636d2f13b966a6d145e287..c5e4fafa63de5881865a79e47ab915f3fbbdf7b2 100644 (file)
 # test running programs
 #
 
-set testfile "cvexpr"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested cvexpr.exp
      return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
index 31bda5d6cd1228865fcea5af9e78eaceaed0a27a..7d89b81eacbdabd2127c83faa849589deacfdced 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-set testfile1 "average"
-set testfile2 "sum"
-set testfile "dbx-test"
-set binfile1 ${objdir}/${subdir}/${testfile1}
-set binfile2 ${objdir}/${subdir}/${testfile2}
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile average.c sum.c
 
-
-
-if  { [gdb_compile "${srcdir}/${subdir}/average.c" "${binfile1}.o" object {debug}] != "" } {
-     untested dbx.exp
-     return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/sum.c" "${binfile2}.o" object {debug}] != "" } {
-     untested dbx.exp
-     return -1
-}
-
-if  { [gdb_compile "${binfile1}.o ${binfile2}.o" ${binfile} executable {debug}] != "" } {
-     untested dbx.exp
-     return -1
+if {[build_executable $testfile.exp $testfile \
+        [list $srcfile $srcfile2] debug] == -1} {
+    untested $testfile.exp
+    return -1
 }
 
 #
index 9230ee8c59e28eac33b2ab90c2a58bcb891f1880..e6fef15dfbd0a2af7aa774a42a668a4d2eca9a94 100644 (file)
@@ -521,6 +521,9 @@ gdb_test "set height" "Argument required .integer to set it to.*" "set height"
 gdb_test_no_output "set history expansion" "set history expansion"
 #test set history filename
 gdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename"
+# Make sure the history ends up in the right place.
+gdb_test_no_output "set history filename [standard_output_file .gdb_history]" \
+    "set the history filename"
 #test set history save
 gdb_test_no_output "set history save" "set history save"
 #test set history size
index 9b7eef9f65cc052b8651ad0d4fac43748a4cab7e..6b647f2f1b028b83b277f16b0629a1e8124dd335 100644 (file)
 # test running programs
 #
 
-set testfile "break"
-set srcfile ${testfile}.c
-set srcfile1 ${testfile}1.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
-     untested define.exp
-     return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
-     untested define.exp
-     return -1
-}
+standard_testfile break.c break1.c
 
-if  { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested define.exp
-     return -1
+if {[prepare_for_testing ${testfile}.exp ${testfile} \
+        [list $srcfile $srcfile2] {debug nowarnings}]} {
+    return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
 
index febcfc679c623fb906fd9937ce12b2d0eca91766..958d4917f8778b1b3b030955996f69d8d60f5a10 100644 (file)
 # shortcuts of the "delete" command never stop working.
 
 
-set testfile del
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile test program"
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+    untested $testfile.exp
     return -1
 }
 
-# Get things started.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # A function to test that ALIAS is working as a shortcut of the "delete"
 # command.
 
index 3d2e90c748fd3d6825686ddf905f5f88a1d57855..0a61d11cae52cabe7cde177dfdae0018d6042e13 100644 (file)
@@ -27,10 +27,8 @@ if [is_remote target] then {
     return 0
 }
 
-set testfile "attach"
-set srcfile  ${testfile}.c
-set binfile  ${objdir}/${subdir}/${testfile}
-set escapedbinfile  [string_to_regexp ${objdir}/${subdir}/${testfile}]
+standard_testfile attach.c
+set escapedbinfile  [string_to_regexp ${binfile}]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      untested detach.exp
index f1218085b5e86cc2084751b5baeca8a49873a148..ce402dfd8724826f04a0363cd6764dba5ede44f0 100644 (file)
@@ -18,9 +18,7 @@
 # This file is part of the gdb testsuite.  It is intended to test that
 # gdb could correctly handle decimal floating point introduced in IEEE 754R.
 
-set testfile "dfp-test"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 # Try to compile the test case.  If we can't, assume the
 # toolchain does not yet provide DFP support and bail out.
@@ -29,10 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if ![runto_main] then {
     perror "couldn't run to breakpoint"
index fa44003d3d35b916703d381ec6599431d6c8701f..5db84ccc43d5f815c83625672910d00dcdce96d2 100644 (file)
 # display.exp   Test display commands
 #               Also do some printing stuff for coverage's sake.
 #
-set testfile display
-set srcfile  ${testfile}.c
-set binfile  ${objdir}/${subdir}/${testfile}
+standard_testfile
 
-
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+        {debug nowarnings}]} {
     untested display.exp
     return -1
 }
@@ -36,11 +33,6 @@ verbose "Timeout is now $timeout seconds" 2
 # use this to debug:
 #log_user 1
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Some coverage stuff
 #
 if !$use_gdb_stub {
index 02b1a9ce05b3c4d5e08909302d287aa207d24d34..822eed737404ead517cba0a7116bae5e2ce2c6ac 100644 (file)
@@ -21,16 +21,18 @@ set testfile dmsym_main
 # This is why we use gdb_compile instead of relying on the usual
 # call to prepare_for_testing.
 
+set dmsym_o [standard_output_file dmsym.o]
+
 if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
-                 ${objdir}/${subdir}/dmsym.o \
+                 $dmsym_o \
                  object {}] != ""} {
   untested dmsym.exp
   return -1
 }
 
 if {[gdb_compile \
-      [list ${srcdir}/${subdir}/dmsym_main.c ${objdir}/${subdir}/dmsym.o] \
-      ${objdir}/${subdir}/${testfile} \
+      [list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
+      [standard_output_file ${testfile}] \
       executable {debug}] != ""} {
     untested dmsym.exp
     return -1
index b2d0b3a17a02b27593a2475553e8e0b2ab5787b5..ea93b89a5ad8ec0816f73952d98e284b42e4b91c 100644 (file)
 # This is a test for the gdb command "dump".
 
 
-set testfile "dump"
+standard_testfile
 
-set srcfile  ${testfile}.c
-set binfile  ${objdir}/${subdir}/${testfile}
 set options  {debug}
 
 set is64bitonly "no"
index 60768011cd9d294b5addfd35ffcdb160125b89d4..fcc762e0efacbbb517d476bfb0063766fa5bd5ea 100644 (file)
@@ -33,11 +33,9 @@ if {![istarget *-*-linux*]
     return 0
 }
 
-set testfile dup-sect
-set srcfile ${testfile}.S
+standard_testfile .S
 set srcmainfile start.c
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
 if {[build_executable ${testfile}.exp $executable [list ${srcfile} ${srcmainfile}] {}] == -1} {
     return -1