* gdb.dwarf2/pr10770.exp: Use standard_testfile.
authorTom Tromey <tromey@redhat.com>
Wed, 27 Jun 2012 17:00:09 +0000 (17:00 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 27 Jun 2012 17:00:09 +0000 (17:00 +0000)
* gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
* gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
* gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
* gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
prepare_for_testing.
* gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
standard_testfile.
* gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
* gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
* gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
* gdb.dwarf2/callframecfa.exp: Use standard_testfile,
prepare_for_testing.
* gdb.dwarf2/dup-psym.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
* gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
* gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
* gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
* gdb.dwarf2/dw2-const.exp: Use standard_testfile.
* gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
* gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
* gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
* gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
* gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
* gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
* gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
* gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
* gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
* gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
* gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
* gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
standard_output_file.
* gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
standard_output_file.
* gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
* gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
* gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
* gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
* gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
* gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
* gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
* gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
* gdb.dwarf2/implptr.exp: Use standard_testfile.
* gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
* gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
* gdb.dwarf2/pieces.exp: Use standard_testfile.
* gdb.dwarf2/pr11465.exp: Use standard_testfile.
* gdb.dwarf2/pr13961.exp: Use standard_testfile.
* gdb.dwarf2/valop.exp: Use standard_testfile,
prepare_for_testing.

51 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/callframecfa.exp
gdb/testsuite/gdb.dwarf2/dup-psym.exp
gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
gdb/testsuite/gdb.dwarf2/dw2-basic.exp
gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
gdb/testsuite/gdb.dwarf2/dw2-const.exp
gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
gdb/testsuite/gdb.dwarf2/dw2-filename.exp
gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
gdb/testsuite/gdb.dwarf2/dw2-producer.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
gdb/testsuite/gdb.dwarf2/dw2-restore.exp
gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
gdb/testsuite/gdb.dwarf2/dw2-strp.exp
gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
gdb/testsuite/gdb.dwarf2/implptr.exp
gdb/testsuite/gdb.dwarf2/mac-fileno.exp
gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
gdb/testsuite/gdb.dwarf2/pieces.exp
gdb/testsuite/gdb.dwarf2/pr10770.exp
gdb/testsuite/gdb.dwarf2/pr11465.exp
gdb/testsuite/gdb.dwarf2/pr13961.exp
gdb/testsuite/gdb.dwarf2/valop.exp

index e412100..283bd03 100644 (file)
@@ -1,5 +1,64 @@
 2012-06-27  Tom Tromey  <tromey@redhat.com>
 
+       * gdb.dwarf2/pr10770.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
+       prepare_for_testing.
+       * gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
+       standard_testfile.
+       * gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
+       * gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
+       * gdb.dwarf2/callframecfa.exp: Use standard_testfile,
+       prepare_for_testing.
+       * gdb.dwarf2/dup-psym.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-const.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
+       standard_output_file.
+       * gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
+       standard_output_file.
+       * gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
+       * gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
+       * gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
+       * gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
+       * gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
+       * gdb.dwarf2/implptr.exp: Use standard_testfile.
+       * gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
+       * gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
+       * gdb.dwarf2/pieces.exp: Use standard_testfile.
+       * gdb.dwarf2/pr11465.exp: Use standard_testfile.
+       * gdb.dwarf2/pr13961.exp: Use standard_testfile.
+       * gdb.dwarf2/valop.exp: Use standard_testfile,
+       prepare_for_testing.
+
+2012-06-27  Tom Tromey  <tromey@redhat.com>
+
        * gdb.python/python.exp: Fix regexps in pagination tests.
 
 2012-06-26  Siva Chandra Reddy  <sivachandra@google.com>
index f527b14..4d989f1 100644 (file)
@@ -25,20 +25,13 @@ if {![is_x86_like_target]} {
     return 0  
 }
 
-set testfile "callframecfa"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
-       [list {additional_flags=-nostdlib}]] != "" } {
+if {[prepare_for_testing $testname.exp $testname $srcfile \
+        [list {additional_flags=-nostdlib}]]} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto_main] {
     return -1
 }
index ec29535..d4fa160 100644 (file)
@@ -21,9 +21,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dup-psym"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 5a3ccee..4e87217 100644 (file)
@@ -19,10 +19,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-ada-ffffffff"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
index 5430399..ada66b0 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-anonymous-func"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 91d86ce..6f8a764 100644 (file)
@@ -19,10 +19,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-bad-parameter-type"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
index 9100eb7..90b112b 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-basic"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 8f58830..3559e7c 100644 (file)
@@ -19,9 +19,10 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-case-insensitive"
+standard_testfile .c dw2-case-insensitive-debug.S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+         [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
index aec50a9..7cc276c 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-compressed"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main-ndebug.o" object -g0] != "" } {
     return -1
index 6e2dc42..087fca9 100644 (file)
@@ -19,9 +19,7 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-const"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
@@ -35,7 +33,7 @@ if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != ""
     return -1
 }
 
-clean_restart ${testfile}.x
+clean_restart ${testfile}
 
 gdb_test "print twelve" "= 12"
 
index 8f6aebe..34e1da4 100644 (file)
@@ -25,8 +25,10 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-cp-infcall-ref-static"
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}-main.c ${testfile}.S] {}] } {
+standard_testfile .S dw2-cp-infcall-ref-static-main.c
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+         [list $srcfile2 $srcfile] {}] } {
     return -1
 }
 
index 3c669a4..7ac0df7 100644 (file)
@@ -24,9 +24,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-cu-size"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 5fa4075..b85d8ed 100644 (file)
@@ -22,15 +22,12 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-double-set-die-type"
-set srcfile "$testfile.S"
-set executable "$testfile.x"
+standard_testfile .S
 
-if  { [gdb_compile [file join $srcdir $subdir $srcfile] \
-          [file join $objdir $subdir $executable] \
+if  { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
           object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 gdb_test "ptype a" "type = class .*"
index 1fb5541..02f2fcf 100644 (file)
@@ -21,15 +21,14 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-empty-namespace"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+          object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # `p var' below can work without identified DWARF DIE just based on its ELF symbol.
 # Catch it here as `type = <data variable, no debug info>'.
index d87dc9c..ee49890 100644 (file)
@@ -19,10 +19,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-empty-pc-range"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
index 992a06c..5cc2534 100644 (file)
@@ -21,15 +21,13 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-filename"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart ${testfile}.x
+clean_restart ${testfile}
 
 # Verify that -file-list-exec-source-files returns a list where
 # the "file" is "file1.txt" (file base name), and "fullname" is
index 1c7bea5..db78006 100644 (file)
@@ -23,10 +23,8 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-icc-opaque"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
index c022c5d..d0c1dff 100644 (file)
@@ -22,9 +22,10 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-ifort-parameter"
+standard_testfile .c dw2-ifort-parameter-debug.S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+         [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
index 3913811..aefe3f5 100644 (file)
@@ -22,14 +22,13 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-inheritance"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+          object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "ptype inherited" "type = class inherited .*"
index 2ef7145..4839d90 100644 (file)
@@ -29,9 +29,10 @@ if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
 }
 
 set basename "inline-break"
-set testfile "dw2-$basename"
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.S {nodebug}] } {
+standard_testfile .S
+
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
     return -1
 }
 
index 73a5c79..30cfdc2 100644 (file)
@@ -19,14 +19,13 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile dw2-inline-param
-set binfile ${objdir}/${subdir}/${testfile}
-if { [build_executable ${testfile}.exp "${testfile}" [list ${testfile}-main.c ${testfile}.S] {nodebug}] } {
+standard_testfile .S dw2-inline-param-main.c
+
+if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+         [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
 
-clean_restart ${testfile}
-
 set break_at ""
 set test "info addr break_at"
 gdb_test_multiple $test $test {
index b3d04da..2eaac65 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-intercu"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 451b5f2..0f76545 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-intermix"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 42a5f45..9eae088 100644 (file)
@@ -25,9 +25,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-linkage-name-trust"
+standard_testfile
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 if { [gdb_compile ${srcdir}/${subdir}/${testfile}-main.cc "${objdir}/${subdir}/${testfile}-main.o" object {c++ debug}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${testfile}.S" "${objdir}/${subdir}/${testfile}.o" object {}] != ""
      || [gdb_compile "${objdir}/${subdir}/${testfile}-main.o ${objdir}/${subdir}/${testfile}.o" "${binfile}" executable {c++}] != "" } {
index 970c17b..7a33254 100644 (file)
@@ -19,17 +19,14 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-modula2-self-type"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # C language would just naively print:
 # type = void (*)(void (*)(void (*)(void (*)(void (*)(...
index 32346ff..5192861 100644 (file)
@@ -19,15 +19,14 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-namespaceless-anonymous"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+          object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "ptype '(anonymous namespace)::v'" "type = myint"
 gdb_test "p '(anonymous namespace)::v'" " = 1"
index 738fd5f..cc2f75b 100644 (file)
@@ -19,12 +19,13 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-objfile-overlap"
+standard_testfile
+
 set srcfile_outer ${testfile}-outer.S
 set srcfile_inner ${testfile}-inner.S
 set executable_outer ${testfile}-outer.x
-set binfile_outer ${objdir}/${subdir}/${executable_outer}
-set binfile_inner ${objdir}/${subdir}/${testfile}-inner.x
+set binfile_outer ${binfile}-outer.x
+set binfile_inner ${binfile}-inner.x
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
       object {}] != ""
index cd6e4f8..dcd9b20 100644 (file)
@@ -21,8 +21,10 @@ if {![dwarf2_support]} {
     return 0   
 }
 
-set testfile "dw2-op-call"
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] } {
+standard_testfile .S main.c
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+         [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
index f731d7b..125b2af 100644 (file)
@@ -19,15 +19,14 @@ if {![dwarf2_support]} {
     return 0   
 }
 
-set testfile "dw2-op-stack-value"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+          object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "p/x stack2" " = 0x1"
 gdb_test "p/x stack8" " = 0x1"
index 0799d1e..71faee3 100644 (file)
@@ -19,8 +19,10 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile dw2-param-error
-if { [prepare_for_testing ${testfile}.exp "${testfile}" "${testfile}-main.c ${testfile}.S" {nodebug}] } {
+standard_testfile .S dw2-param-error-main.c
+
+if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+         [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
 
index 261b5b0..0961081 100644 (file)
@@ -19,10 +19,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-producer"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 83abd2a..dea212d 100644 (file)
@@ -32,17 +32,13 @@ if !$gcc_compiled {
     return 0  
 }
 
-set testfile "dw2-ranges"
-set srcfile ${testfile}.c
-set srcfile2 ${testfile}2.c
-set srcfile3 ${testfile}3.c
-set asmfile ${objdir}/${subdir}/${testfile}.s
-set asmfile2 ${objdir}/${subdir}/${testfile}2.s
-set asmfile3 ${objdir}/${subdir}/${testfile}3.s
-set objfile ${objdir}/${subdir}/${testfile}.o
-set objfile2 ${objdir}/${subdir}/${testfile}2.o
-set objfile3 ${objdir}/${subdir}/${testfile}3.o
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile dw2-ranges.c dw2-ranges2.c dw2-ranges3.c
+set asmfile [standard_output_file ${testfile}.s]
+set asmfile2 [standard_output_file ${testfile}2.s]
+set asmfile3 [standard_output_file ${testfile}3.s]
+set objfile [standard_output_file ${testfile}.o]
+set objfile2 [standard_output_file ${testfile}2.o]
+set objfile3 [standard_output_file ${testfile}3.o]
 
 # Generate .s without debug info but provide debug info by the assembler.
 # This way we get DW_TAG_compile_unit DIE and only that DIE.
index 01960a6..75c1eb4 100644 (file)
@@ -19,17 +19,15 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-ref-missing-frame"
-set srcsfile ${testfile}.S
-set objsfile ${objdir}/${subdir}/${testfile}.o
+standard_testfile .S
+set objsfile [standard_output_file ${testfile}.o]
 set srcfuncfile ${testfile}-func.c
-set objfuncfile ${objdir}/${subdir}/${testfile}-func.o
+set objfuncfile [standard_output_file ${testfile}-func.o]
 set srcmainfile ${testfile}-main.c
-set objmainfile ${objdir}/${subdir}/${testfile}-main.o
+set objmainfile [standard_output_file ${testfile}-main.o]
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != ""
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
      || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {
index a04ab55..99d8191 100644 (file)
@@ -19,9 +19,7 @@
 if {![istarget x86_64-*] || ![is_lp64_target]} {
     return 0  
 }
-set testfile "dw2-restore"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
        [list {additional_flags=-nostdlib}]] != "" } {
index 72a075c..77d42ec 100644 (file)
@@ -19,16 +19,13 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-simple-locdesc"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
 # http://sourceware.org/ml/gdb-patches/2011-07/msg00766.html
index 31d0c63..1367cb1 100644 (file)
@@ -36,9 +36,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-skip-prologue"
+standard_testfile
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
 if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S" {additional_flags=-DINLINED}] == -1} {
     return -1
index 1468e95..03dd576 100644 (file)
@@ -19,10 +19,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-stack-boundary"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
index 4148297..b98833e 100644 (file)
@@ -22,9 +22,7 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "dw2-strp"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 9df6a7e..e149fe1 100644 (file)
@@ -19,8 +19,10 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile dw2-var-zero-addr
-if [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] {
+standard_testfile .S main.c
+
+if [prepare_for_testing ${testfile}.exp ${testfile} \
+       [list $srcfile $srcfile2] {nodebug}] {
     return -1
 }
 
index 5cc195b..2baae8b 100644 (file)
@@ -19,10 +19,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw4-sig-type-unused"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
index 878627a..d63597d 100644 (file)
 
 # Test dwarf4 signatured types.
 
-set test "dw4-sig-types"
-set executable ${test}.x
+standard_testfile .cc dw4-sig-types-b.cc
 
 # This test is intended for targets which support DWARF-4.
 # Since we pass an explicit -gdwarf-4 to the compiler, we let
 # that be the test of whether the target supports it.
 
-if { [prepare_for_testing "${test}.exp" "${executable}" \
-       {dw4-sig-types.cc dw4-sig-types-b.cc} \
-       {debug c++ additional_flags=-gdwarf-4}] } {
+if { [prepare_for_testing "${test}.exp" "${testfile}" \
+         [list $srcfile $srcfile2] \
+         {debug c++ additional_flags=-gdwarf-4}] } {
     return -1
 }
 
index cd86389..78f1594 100644 (file)
@@ -19,8 +19,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "implptr-64bit"
-set srcfile ${testfile}.S
+standard_testfile .S
 set mainfile main.c
 
 proc test { dwarf_version offset_size addr_size ref_addr_size } {
index ac0f95f..a810f7c 100644 (file)
@@ -19,11 +19,9 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "implptr-optimized-out"
-set srcfile ${testfile}.S
+standard_testfile .S
 set mainfile main.c
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
 if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" {}] {
     return -1
index 55181e4..a510516 100644 (file)
@@ -21,10 +21,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "implptr"
-set srcfile ${testfile}.S
+standard_testfile .S
 set csrcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}.x
 set opts {}
 
 if [info exists COMPILE] {
@@ -36,7 +34,7 @@ if [info exists COMPILE] {
     return 0  
 }
 
-if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile $opts]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
     return -1
 }
 
index 5fc5975..b329081 100644 (file)
@@ -22,10 +22,8 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "mac-fileno"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
index 3af2082..5b8b5ed 100644 (file)
@@ -21,11 +21,9 @@ if {![dwarf2_support]} {
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile member-ptr-forwardref
-set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}.x
+standard_testfile .S
 
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}.S" ${binfile} object {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
     untested ${testfile}.exp
     return -1
 }
index 58331c1..eb3b5dc 100644 (file)
@@ -24,12 +24,10 @@ if {![is_x86_like_target]} {
     return 0  
 }
 
-set testfile "pieces"
-set srcfile ${testfile}.S
+standard_testfile .S
 set csrcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}.x
 
-if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
     return -1
 }
 
index a381227..4c60b16 100644 (file)
@@ -15,8 +15,7 @@
 
 # Test DW_OP_call_frame_cfa.
 
-set testfile "pr10770"
-set srcfile ${testfile}.c
+standard_testfile
 
 if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} {
     return 0
index d6513f5..22c5007 100644 (file)
@@ -19,10 +19,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "pr11465"
-set srcfile "$testfile.S"
-set executable "$testfile.x"
-set binfile [file join $objdir $subdir $executable]
+standard_testfile .S
 
 if [is_ilp32_target] {
     set ptrbits 32
@@ -35,7 +32,7 @@ if  { [gdb_compile [file join $srcdir $subdir $srcfile] \
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # Test delayed physname computations
 gdb_test "p N::c.C" { = {void \(N::C \* const, void \(\*\)\(N::C\)\)}.*}
index c70f2b2..1dc6f0a 100644 (file)
@@ -22,11 +22,9 @@ if {![dwarf2_support]} {
     return 0
 }
 
-set testfile "pr13961"
-set srcfile ${testfile}.S
-set binfile ${testfile}.x
+standard_testfile .S
 
-if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] == -1 } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
     return -1
 }
 
index 5ce7b64..9cd99f0 100644 (file)
@@ -25,20 +25,13 @@ if {![is_x86_like_target]} {
     return 0  
 }
 
-set testfile "valop"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
-       [list {additional_flags=-nostdlib}]] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile \
+        [list $srcfile] [list {additional_flags=-nostdlib}]]} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto_main] {
     return -1
 }