aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog59
-rw-r--r--gdb/testsuite/gdb.dwarf2/callframecfa.exp13
-rw-r--r--gdb/testsuite/gdb.dwarf2/dup-psym.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-basic.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-compressed.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-const.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-filename.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-intercu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-intermix.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp7
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp7
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-call.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-param-error.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-producer.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges.exp18
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp12
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restore.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp7
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-strp.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr-64bit.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/mac-fileno.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/pieces.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr10770.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr11465.exp7
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr13961.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/valop.exp13
51 files changed, 178 insertions, 198 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e412100..283bd03 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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>
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index f527b14..4d989f1 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.exp b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
index ec29535..d4fa160 100644
--- a/gdb/testsuite/gdb.dwarf2/dup-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
index 5a3ccee..4e87217 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 5430399..ada66b0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
index 91d86ce..6f8a764 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
@@ -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 {}] != "" } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 9100eb7..90b112b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
index 8f58830..3559e7c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index aec50a9..7cc276c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
index 6e2dc42..087fca9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index 8f6aebe..34e1da4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
index 3c669a4..7ac0df7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
index 5fa4075..b85d8ed 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
@@ -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 .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
index 1fb5541..02f2fcf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
@@ -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>'.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
index d87dc9c..ee49890 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index 992a06c..5cc2534 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index 1c7bea5..db78006 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index c022c5d..d0c1dff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
index 3913811..aefe3f5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
@@ -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 .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index 2ef7145..4839d90 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index 73a5c79..30cfdc2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -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 {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index b3d04da..2eaac65 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index 451b5f2..0f76545 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index 42a5f45..9eae088 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -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++}] != "" } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
index 970c17b..7a33254 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
@@ -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 (*)(...
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index 32346ff..5192861 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
index 738fd5f..cc2f75b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
@@ -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 {}] != ""
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
index cd6e4f8..dcd9b20 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
index f731d7b..125b2af 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index 0799d1e..71faee3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 261b5b0..0961081 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index 83abd2a..dea212d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -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.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index 01960a6..75c1eb4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -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 {}] != "" } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index a04ab55..99d8191 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -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}]] != "" } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
index 72a075c..77d42ec 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
index 31d0c63..1367cb1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index 1468e95..03dd576 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index 4148297..b98833e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index 9df6a7e..e149fe1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
index 5cc195b..2baae8b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
index 878627a..d63597d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
@@ -15,16 +15,15 @@
# 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
}
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
index cd86389..78f1594 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
@@ -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 } {
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
index ac0f95f..a810f7c 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index 55181e4..a510516 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index 5fc5975..b329081 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 3af2082..5b8b5ed 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index 58331c1..eb3b5dc 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/pr10770.exp b/gdb/testsuite/gdb.dwarf2/pr10770.exp
index a381227..4c60b16 100644
--- a/gdb/testsuite/gdb.dwarf2/pr10770.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr10770.exp
@@ -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
diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp
index d6513f5..22c5007 100644
--- a/gdb/testsuite/gdb.dwarf2/pr11465.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp
@@ -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\)\)}.*}
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp
index c70f2b2..1dc6f0a 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index 5ce7b64..9cd99f0 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -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
}