* 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 e412100df8d4f2ec1a2cdfb81be46a8d0b5135ea..283bd033c4263eaa1c25d62bfa71ebf3de9c3963 100644 (file)
@@ -1,3 +1,62 @@
+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.
index f527b1489e57b2db34ee5860161da64bbd43f06c..4d989f1540deb5c2b7576d0b6fc7bbf59d4daff6 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 ec295355776f711dc3cd8bac322af39ebf4e722c..d4fa160dfb939b332edf75f3462c25058de70865 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 5a3cceed778b4d03a255a92f848904c453892311..4e87217b53e0c579feb22a49d592c0330fb1cda0 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 5430399972171eae8be85bd8b339f44a3df4f521..ada66b061fbee549a645a1e2fd435ae4b9c3e53f 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 91d86ce73eb9f606f5f45dfcbd0259ba85d11cec..6f8a764cfb97630f1fa6ddac910050ac13a54e75 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 9100eb7920ea5b2dc820089ed9fd6682eb669e9d..90b112b7a92112ba80c5232eabf6d0afb1de2713 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 8f58830a5afdc5dab2ba56509ecf517fdc52ffdb..3559e7cf1c511d2be9f7e8ba96ff7b3bb688eb1d 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 aec50a90edb106ce32570073b03ab3eeb88e1fe5..7cc276c0e7cf31ed2445dc55b7e9e8818475d6da 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 6e2dc42929b6568586875f25248545cf0f2bc981..087fca97de0ea1d05ee2d4b8557d711ca30a9ec7 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 8f6aebe50729cd7eb79ccf33dbf84b9c55044c7e..34e1da46b4c198eec891895adb61c9e420f7a112 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 3c669a4d1fc48d5e5d21376d91e49dce686f1d63..7ac0df7b38410d771496b38502d660259158c25c 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 5fa4075aa1e7b63a5113ef4f8858319f0a8efb83..b85d8ed7626d1f3aa4906394a8b3b99bb5106099 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 1fb5541f950ce97fb138b37c0f73487d413c6eb0..02f2fcf25ec146030159e649ec137132b7e8b163 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 d87dc9c882869f422b9a96542f40c118663a00c4..ee49890ee7d22952ac3c5d66bc8f2dd491fbb4a3 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 992a06cd15840cba05ca1b0c62ee068f8bf26a37..5cc2534390265a4c2decd9dafbfc4154ca3dd3f1 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 1c7bea5f22d165cc5aab47dc700aafe252597d6f..db78006b5090a284a03cc0d6c5f50b581dadd612 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 c022c5dbfa54363e2b41f4ddc94ab6c104f59070..d0c1dff23d6b06d81f118b6a8be38e6edebe9e49 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 391381161563b0296dc8253747df1d1bafd5b520..aefe3f517435cd8c6cf27128d850730e905a128c 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 2ef7145765d6b39a2485c8415def43a860a9c5bc..4839d90430cd5e7e833732c9f42d48f0329d27ad 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 73a5c79116d98b71316118fb2316450c1f6d4241..30cfdc2692fa38af3ed88f5b88024c8b5bef7bcd 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 b3d04dac5791936e7db9bc1e25ca087f0a385cc4..2eaac65d9ebd3a128bd09382dd21e30cf199dc8f 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 451b5f2d1e84bbce0a87f83a7c0f32425dffed91..0f765452e3224799b68f996e51ef657c84d0a98f 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 42a5f451cdb45804de8c68f0b315bccb13b5c68d..9eae088fea8298faa4a7bcfe995c2e719c029b39 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 970c17b2a7a5da890ef064ce209bccc70fa058d4..7a332547609682a2169ecb75d110e9f1306d399d 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 32346ffdab79b51645a1faaa70ced4f42613b481..5192861c0737ce91904ef0729999ce8406857d64 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 738fd5f7acb0ce0a2272d3e27c1168ac839dcd95..cc2f75b9366a8089a2f3253fa966641ef4b33a04 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 cd6e4f8af6bdce76460514da80f5bcf38cc9c03e..dcd9b20f012fb8579047363659df52abcfa25d8d 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 f731d7ba8e01b1c6c053dcdf703dac49370d8545..125b2af98d47fe8dbfb5823eca7730a34e434239 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 0799d1ecce3dabff73818fd1bbcdeed0edd6dd9b..71faee320377026bf9346f029427a32c2fe117ff 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 261b5b0457f76bc9193b1b62960f227305ff187b..0961081d964723e75426b5ca7dca78df32dde5b0 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 83abd2a45112428f670dad29e9a01347a1a64d7a..dea212d475dab9828562520a5774c15bdfabd082 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 01960a674e35f0a327b160cac168d3edaa473bcf..75c1eb4ed886917f1deff5d460a343e850269463 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 a04ab55109e25f87916e6df2d296b74779a481dc..99d8191b6dac77644de8afe00479d36375e272f2 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 72a075c86e4d3125f2adfc6f9e2edde4e4623f1a..77d42ecff0d42359d6c61cc8bf82b778cf2e89cb 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 31d0c6304d3e8b0d3a7d442d41f4329172afe753..1367cb12706cf57da9c12edd91f351b084026676 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 1468e95a36ea84f03a4c091a69b39cdb426326b8..03dd576819cf378f1380d7f0ee98bda9fd214283 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 41482972c43139872ea0016679bb047241397e66..b98833e61a694057dbd063271e24e2a3ece7fc03 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 9df6a7e6df955427a73ecaae545e062f76509170..e149fe1dfb4b3ac2424ae647865cec802d01859f 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 5cc195be10d65c0494f5152dc54437c785031460..2baae8b62d12e3822531755326b1513108f252d1 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 878627a6b003d4610b915e26c42341dc84d3cc0a..d63597d9107135c59d2ba3a15cd41fe9a9ce91aa 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 cd863899824f75dc40d4b3dcd6a5d0cb9380f979..78f1594d1e68362a987bc5ce8ed73133e33b9518 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 ac0f95ffc265cbc7ee049d143e3d4a244604587d..a810f7c012411bd6dd0412b222d1445cf08b7211 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 55181e44c37342b8082c838767c137e229d2c254..a510516e4ea9cd8387deac372bf961df4242d650 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 5fc5975fbfb5d69bce9e6f3bdaed9ef4bceba419..b329081784bf2997f9e952caad5f91387fd4c10d 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 3af2082d4f777ce21442bf3490a1ad1ec32d9661..5b8b5edfc61f1d1c23d87ef7f3cdd7544ba54ded 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 58331c14bbf0c99594379501092419e6af5ca330..eb3b5dccb2c10cd05bfd1ac281a29133a761c10f 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 a381227b7702daafade2b1dbadab5d19482bf601..4c60b163f80258f02bc2cfcf5b191811d317b1fd 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 d6513f591882b8dccb11ea89a42e155220aa6b7f..22c50076398fca9904afebc542c5c6ee49acd82f 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 c70f2b26e3850043ee2d27c8fb337d79644f38ab..1dc6f0a0a764ce2f85a7f00ba5c3529f6671daba 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 5ce7b64503e7da1bdd116a2f9cb3798fe77e2b78..9cd99f0cdc471557d99b64e3f5ad31a2764ae67f 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
 }