summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-10-17 00:10:31 +0200
committerTom de Vries <tdevries@suse.de>2020-10-17 00:10:31 +0200
commitd1c8a76d05e3224449cb3849f42e26db6b0eabfe (patch)
tree04a2961ab26d0fc4ad4d9c0556311a5d01c6f0f5
parent874ef0386fe438d654f0c3c230d4a9d0c4db9213 (diff)
downloadbinutils-gdb-d1c8a76d05e3224449cb3849f42e26db6b0eabfe.tar.gz
[gdb/testsuite] Remove hardcoded filenames in gdb.dwarf2/*.exp
There's a common occurance in dwarf assembly test-cases, where a file test.exp contains: ... standard_testfile test.c test-dw.S ... The "test.c" arg can be abbreviated to ".c". Make standard_testfile treat args with "-" prefix the same as with "." prefix, such that we can write: ... standard_testfile .c -dw.S ... and apply this in gdb.dwarf2/*.exp. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-10-17 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (standard_testfile): Also treat args starting with '-' as suffix. * gdb.dwarf2/atomic.c: Rename to ... * gdb.dwarf2/atomic-type.c: ... this. * gdb.dwarf2/dw2-ranges2.c: Rename to ... * gdb.dwarf2/dw2-ranges-2.c: ... this. * gdb.dwarf2/dw2-ranges3.c: Rename to ... * gdb.dwarf2/dw2-ranges-3.c: ... this. * gdb.dwarf2/fission-mix2.c: Rename to ... * gdb.dwarf2/fission-mix-2.c: ... this. * gdb.dwarf2/ada-linkage-name.exp: Use more suffix args for standard_testfile. * gdb.dwarf2/ada-valprint-error.exp: Same. * gdb.dwarf2/arr-stride.exp: Same. * gdb.dwarf2/arr-subrange.exp: Same. * gdb.dwarf2/atomic-type.exp: Same. * gdb.dwarf2/bad-regnum.exp: Same. * gdb.dwarf2/break-inline-psymtab.exp: Same. * gdb.dwarf2/clang-debug-names-2.exp: Same. * gdb.dwarf2/clang-debug-names.exp: Same. * gdb.dwarf2/comp-unit-lang.exp: Same. * gdb.dwarf2/corrupt.exp: Same. * gdb.dwarf2/count.exp: Same. * gdb.dwarf2/cpp-linkage-name.exp: Same. * gdb.dwarf2/data-loc.exp: Same. * gdb.dwarf2/dw2-align.exp: Same. * gdb.dwarf2/dw2-bad-elf.exp: Same. * gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Same. * gdb.dwarf2/dw2-bad-unresolved.exp: Same. * gdb.dwarf2/dw2-case-insensitive.exp: Same. * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Same. * gdb.dwarf2/dw2-ifort-parameter.exp: Same. * gdb.dwarf2/dw2-inline-many-frames.exp: Same. * gdb.dwarf2/dw2-inline-param.exp: Same. * gdb.dwarf2/dw2-inline-small-func.exp: Same. * gdb.dwarf2/dw2-inline-stepping.exp: Same. * gdb.dwarf2/dw2-is-stmt-2.exp: Same. * gdb.dwarf2/dw2-is-stmt.exp: Same. * gdb.dwarf2/dw2-line-number-zero.exp: Same. * gdb.dwarf2/dw2-namespaceless-anonymous.exp: Same. * gdb.dwarf2/dw2-opt-structptr.exp: Same. * gdb.dwarf2/dw2-param-error.exp: Same. * gdb.dwarf2/dw2-ranges-base.exp: Same. * gdb.dwarf2/dw2-ranges.exp: Same. * gdb.dwarf2/dw2-unusual-field-names.exp: Same. * gdb.dwarf2/dw2-vendor-extended-opcode.exp: Same. * gdb.dwarf2/dw4-sig-types.exp: Same. * gdb.dwarf2/dynarr-ptr.exp: Same. * gdb.dwarf2/enum-type.exp: Same. * gdb.dwarf2/fission-mix.exp: Same. * gdb.dwarf2/formdata16.exp: Same. * gdb.dwarf2/implptrconst.exp: Same. * gdb.dwarf2/implptrpiece.exp: Same. * gdb.dwarf2/info-locals-optimized-out.exp: Same. * gdb.dwarf2/main-subprogram.exp: Same. * gdb.dwarf2/method-ptr.exp: Same. * gdb.dwarf2/missing-sig-type.exp: Same. * gdb.dwarf2/nonvar-access.exp: Same. * gdb.dwarf2/opaque-type-lookup.exp: Same. * gdb.dwarf2/shortpiece.exp: Same. * gdb.dwarf2/staticvirtual.exp: Same. * gdb.dwarf2/subrange.exp: Same. * gdb.dwarf2/symtab-producer.exp: Same. * gdb.dwarf2/typedef-void-finish.exp: Same. * gdb.dwarf2/var-access.exp: Same. * gdb.dwarf2/variant.exp: Same. * gdb.dwarf2/void-type.exp: Same. * gdb.dwarf2/dw2-ranges-psym.exp: Same. Use main.c instead of dw2-ranges-main.c. * gdb.dwarf2/dw2-ranges-main.c: Remove.
-rw-r--r--gdb/testsuite/ChangeLog73
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-stride.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-subrange.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/atomic-type.c (renamed from gdb/testsuite/gdb.dwarf2/atomic.c)0
-rw-r--r--gdb/testsuite/gdb.dwarf2/atomic-type.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/bad-regnum.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/clang-debug-names.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/corrupt.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/count.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/data-loc.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-align.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-param-error.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-2.c (renamed from gdb/testsuite/gdb.dwarf2/dw2-ranges2.c)0
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-3.c (renamed from gdb/testsuite/gdb.dwarf2/dw2-ranges3.c)0
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-main.c19
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/enum-type.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-mix-2.c (renamed from gdb/testsuite/gdb.dwarf2/fission-mix2.c)0
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-mix.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/formdata16.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrpiece.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/main-subprogram.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/method-ptr.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/missing-sig-type.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/nonvar-access.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/shortpiece.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/staticvirtual.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/subrange.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/symtab-producer.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/var-access.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/variant.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/void-type.exp2
-rw-r--r--gdb/testsuite/lib/gdb.exp9
64 files changed, 138 insertions, 82 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 95ec80b14df..50d21cb3027 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,76 @@
+2020-10-17 Tom de Vries <tdevries@suse.de>
+
+ * lib/gdb.exp (standard_testfile): Also treat args starting with '-'
+ as suffix.
+ * gdb.dwarf2/atomic.c: Rename to ...
+ * gdb.dwarf2/atomic-type.c: ... this.
+ * gdb.dwarf2/dw2-ranges2.c: Rename to ...
+ * gdb.dwarf2/dw2-ranges-2.c: ... this.
+ * gdb.dwarf2/dw2-ranges3.c: Rename to ...
+ * gdb.dwarf2/dw2-ranges-3.c: ... this.
+ * gdb.dwarf2/fission-mix2.c: Rename to ...
+ * gdb.dwarf2/fission-mix-2.c: ... this.
+ * gdb.dwarf2/ada-linkage-name.exp: Use more suffix args for
+ standard_testfile.
+ * gdb.dwarf2/ada-valprint-error.exp: Same.
+ * gdb.dwarf2/arr-stride.exp: Same.
+ * gdb.dwarf2/arr-subrange.exp: Same.
+ * gdb.dwarf2/atomic-type.exp: Same.
+ * gdb.dwarf2/bad-regnum.exp: Same.
+ * gdb.dwarf2/break-inline-psymtab.exp: Same.
+ * gdb.dwarf2/clang-debug-names-2.exp: Same.
+ * gdb.dwarf2/clang-debug-names.exp: Same.
+ * gdb.dwarf2/comp-unit-lang.exp: Same.
+ * gdb.dwarf2/corrupt.exp: Same.
+ * gdb.dwarf2/count.exp: Same.
+ * gdb.dwarf2/cpp-linkage-name.exp: Same.
+ * gdb.dwarf2/data-loc.exp: Same.
+ * gdb.dwarf2/dw2-align.exp: Same.
+ * gdb.dwarf2/dw2-bad-elf.exp: Same.
+ * gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Same.
+ * gdb.dwarf2/dw2-bad-unresolved.exp: Same.
+ * gdb.dwarf2/dw2-case-insensitive.exp: Same.
+ * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Same.
+ * gdb.dwarf2/dw2-ifort-parameter.exp: Same.
+ * gdb.dwarf2/dw2-inline-many-frames.exp: Same.
+ * gdb.dwarf2/dw2-inline-param.exp: Same.
+ * gdb.dwarf2/dw2-inline-small-func.exp: Same.
+ * gdb.dwarf2/dw2-inline-stepping.exp: Same.
+ * gdb.dwarf2/dw2-is-stmt-2.exp: Same.
+ * gdb.dwarf2/dw2-is-stmt.exp: Same.
+ * gdb.dwarf2/dw2-line-number-zero.exp: Same.
+ * gdb.dwarf2/dw2-namespaceless-anonymous.exp: Same.
+ * gdb.dwarf2/dw2-opt-structptr.exp: Same.
+ * gdb.dwarf2/dw2-param-error.exp: Same.
+ * gdb.dwarf2/dw2-ranges-base.exp: Same.
+ * gdb.dwarf2/dw2-ranges.exp: Same.
+ * gdb.dwarf2/dw2-unusual-field-names.exp: Same.
+ * gdb.dwarf2/dw2-vendor-extended-opcode.exp: Same.
+ * gdb.dwarf2/dw4-sig-types.exp: Same.
+ * gdb.dwarf2/dynarr-ptr.exp: Same.
+ * gdb.dwarf2/enum-type.exp: Same.
+ * gdb.dwarf2/fission-mix.exp: Same.
+ * gdb.dwarf2/formdata16.exp: Same.
+ * gdb.dwarf2/implptrconst.exp: Same.
+ * gdb.dwarf2/implptrpiece.exp: Same.
+ * gdb.dwarf2/info-locals-optimized-out.exp: Same.
+ * gdb.dwarf2/main-subprogram.exp: Same.
+ * gdb.dwarf2/method-ptr.exp: Same.
+ * gdb.dwarf2/missing-sig-type.exp: Same.
+ * gdb.dwarf2/nonvar-access.exp: Same.
+ * gdb.dwarf2/opaque-type-lookup.exp: Same.
+ * gdb.dwarf2/shortpiece.exp: Same.
+ * gdb.dwarf2/staticvirtual.exp: Same.
+ * gdb.dwarf2/subrange.exp: Same.
+ * gdb.dwarf2/symtab-producer.exp: Same.
+ * gdb.dwarf2/typedef-void-finish.exp: Same.
+ * gdb.dwarf2/var-access.exp: Same.
+ * gdb.dwarf2/variant.exp: Same.
+ * gdb.dwarf2/void-type.exp: Same.
+ * gdb.dwarf2/dw2-ranges-psym.exp: Same. Use main.c instead of
+ dw2-ranges-main.c.
+ * gdb.dwarf2/dw2-ranges-main.c: Remove.
+
2020-10-16 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_breakpoint): Remove mention of "passfail".
diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
index c10a592df74..0b440c8e6da 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
@@ -23,7 +23,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile ada-linkage-name.c ada-linkage-name-debug.S
+standard_testfile .c -debug.S
# Set up the DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
index fd0928f610c..698562de92f 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile ada-valprint-error.c ada-valprint-error-dw.S
+standard_testfile .c -dw.S
# We need to know the size of integer and address types in order
# to write some of the debugging info we'd like to generate.
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index 61c280e4f97..e8bff357b06 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile arr-stride.c arr-stride-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index 4e355ff5c16..7c8250413b0 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile arr-subrange.c arr-subrange-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/atomic.c b/gdb/testsuite/gdb.dwarf2/atomic-type.c
index 89299890533..89299890533 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic.c
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.c
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index 9a44686f438..d28af05d26e 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile atomic.c atomic-type-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index 54eb2eaceae..5a4d91d911a 100644
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
+++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile bad-regnum.c bad-regnum-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
index 344d7da0d54..552b298fabe 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-standard_testfile break-inline-psymtab.c break-inline-psymtab-2.c
+standard_testfile .c -2.c
set sources [list $srcfile $srcfile2]
if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } {
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
index 43d7801c0d9..c5d39ebfb14 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
@@ -20,8 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile clang-debug-names-2.c clang-debug-names-debug-2.S \
- clang-debug-names-2-foo.c
+standard_testfile .c -debug.S -foo.c
lassign \
[function_range main \
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
index 149c1263c90..9656d7ec1ac 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile clang-debug-names.c clang-debug-names-debug.S
+standard_testfile .c -debug.S
lassign [function_range main ${srcdir}/${subdir}/${srcfile}] \
main_start main_length
diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
index 162848be941..cb1741fcaf3 100644
--- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
+++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
@@ -25,7 +25,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c comp-unit-lang.S
+standard_testfile .c .S
# Assemble the DWARF using CU_LANG as compilation unit's language.
# Run to a function in that compilation unit and check that GDB
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index 971ec71bb4a..d89beb596e9 100644
--- a/gdb/testsuite/gdb.dwarf2/corrupt.exp
+++ b/gdb/testsuite/gdb.dwarf2/corrupt.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile corrupt.c corrupt.S
+standard_testfile .c .S
# Make the DWARF used for the test.
#
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index b55a97cec74..5cefb15da4a 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -22,7 +22,7 @@ if { ![dwarf2_support] } {
return 0
}
-standard_testfile main.c count.S
+standard_testfile main.c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
index 7ff49380292..f2c88b9b553 100644
--- a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
@@ -25,7 +25,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile cpp-linkage-name.c cpp-linkage-name-debug.S
+standard_testfile .c -debug.S
# Set up the DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index de21dffa1e4..ce4062eba3c 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile data-loc.c data-loc-dw.S
+standard_testfile .c -dw.S
# We need to know the size of integer and address types in order
# to write some of the debugging info we'd like to generate.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
index ef8b52c4f4c..640216ae192 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile main.c align-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index f6fe54a634f..c06a605e5de 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -34,7 +34,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-bad-elf.c dw2-bad-elf-other.S dw2-bad-elf-dwarf.S
+standard_testfile .c -other.S -dwarf.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile3]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index 986de0c526d..238297c76ae 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-bad-mips-linkage-name.c dw2-bad-mips-linkage-name.S
+standard_testfile .c .S
# Set up the DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
index 5e22ef37938..44d5faa97bd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-bad-unresolved.c dw2-bad-unresolved-2.S
+standard_testfile .c -2.S
# Set up the DWARF for the test.
# The key part of this is the definition of variable "var" having no location.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
index 4b56469e622..0be2d89d4fd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c dw2-case-insensitive-debug.S
+standard_testfile .c -debug.S
if [is_ilp32_target] {
set ptrbits 32
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 73f29e0d9de..a4fd4aa92fc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -25,7 +25,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .S dw2-cp-infcall-ref-static-main.c
+standard_testfile .S -main.c
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile2 $srcfile] {}] } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index 32ae5ed66aa..d299dc353ff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c dw2-ifort-parameter-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index e826825eb4b..935d519934c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -38,7 +38,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-inline-many-frames.c dw2-inline-many-frames.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index 1c1e75619da..ad48588a19a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .S dw2-inline-param-main.c
+standard_testfile .S -main.c
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile2 $srcfile] {nodebug}] } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index 12a60a01edd..69d1c42266c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -39,8 +39,8 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-inline-small-func-lbls.c dw2-inline-small-func.S \
- dw2-inline-small-func.c dw2-inline-small-func.h
+standard_testfile -lbls.c .S \
+ .c .h
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index 1632d5e8989..24fbb717b22 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -38,7 +38,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-inline-stepping.c dw2-inline-stepping.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 745af0409fa..b2b4308744e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -38,7 +38,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-is-stmt-2.c dw2-is-stmt-2.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 62e655a0ee8..30045a9be92 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -38,7 +38,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-is-stmt.c dw2-is-stmt.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 12011b5f9c0..164397e81e7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -29,7 +29,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile .c dw2-line-number-zero-dw.S
+standard_testfile .c -dw.S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index 5b61a6ba928..a6d9a500287 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-namespaceless-anonymous.c dw2-namespaceless-anonymous.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index d6e309d0d73..496eddcc861 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -28,7 +28,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-opt-structptr.c dw2-opt-structptr-dw.S
+standard_testfile .c -dw.S
# Generate a test program with dwarf information showing the variable
# 'ptr', a pointer-to-struct, as optimized out. The dwarf will also
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index 9cf6aa73816..e694fe12e61 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .S dw2-param-error-main.c
+standard_testfile .S -main.c
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile2 $srcfile] {nodebug}] } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges2.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-2.c
index d29f49bc62a..d29f49bc62a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges2.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-2.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges3.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-3.c
index 1af9665137d..1af9665137d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges3.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-3.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 39281a8857f..0d363b1a443 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -32,7 +32,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-ranges-base.c dw2-ranges-base-dw.S
+standard_testfile .c -dw.S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-main.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-main.c
deleted file mode 100644
index 7d232884678..00000000000
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-main.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2019-2020 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-int main ()
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index 7a33e35278b..4ced125cd18 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -31,7 +31,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-ranges-main.c dw2-ranges-psym.c dw2-ranges-psym-dw.S
+standard_testfile main.c .c -dw.S
# We need to know the size of integer and address types in order to
# write some of the debugging info we'd like to generate.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index 05cc4318f3d..adddc93ff4c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -32,7 +32,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-ranges.c dw2-ranges2.c dw2-ranges3.c
+standard_testfile .c -2.c -3.c
set asmfile [standard_output_file ${testfile}.s]
set asmfile2 [standard_output_file ${testfile}2.s]
set asmfile3 [standard_output_file ${testfile}3.s]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
index fd1ec1e106b..1ff7b66587f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
@@ -34,7 +34,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dw2-unusual-field-names.c dw2-unusual-field-names.S
+standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
# We need to know the size of integer and address types in order to
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 92db7eaa514..08f0e29b7e2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -29,7 +29,7 @@ if !$gcc_compiled {
return 0
}
-standard_testfile dw2-vendor-extended-opcode.c dw2-vendor-extended-opcode-dw.S
+standard_testfile .c -dw.S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
index 35579f7b6fa..05edca580e8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
@@ -15,7 +15,7 @@
# Test dwarf4 signatured types (DW_TAG_type_unit).
-standard_testfile .cc dw4-sig-types-b.cc
+standard_testfile .cc -b.cc
# This test is intended for targets which support DWARF-4.
# Since we pass an explicit -gdwarf-4 -fdebug-types-section to the compiler,
diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
index 2f6b17c6dc5..fbbcd3b88d3 100644
--- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile dynarr-ptr.c dynarr-ptr-dw.S
+standard_testfile .c -dw.S
# We need to know the size of integer and address types in order
# to write some of the debugging info we'd like to generate.
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index d61c1455587..0b12d19453a 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile main.c enum-type-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/fission-mix2.c b/gdb/testsuite/gdb.dwarf2/fission-mix-2.c
index ddac2659aa6..ddac2659aa6 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-mix2.c
+++ b/gdb/testsuite/gdb.dwarf2/fission-mix-2.c
diff --git a/gdb/testsuite/gdb.dwarf2/fission-mix.exp b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
index cede8cb84a1..d738a03c3fd 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-mix.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
@@ -20,11 +20,11 @@ if ![dwarf2_support] {
return 0
}
-standard_testfile fission-mix.c fission-mix2.c
+standard_testfile .c -2.c
set objfile [standard_output_file ${testfile}.o]
set objfile2 [standard_output_file ${testfile}2.o]
-# Compile fission-mix.c without Fission and fission-mix2.c with Fission.
+# Compile fission-mix.c without Fission and fission-mix-2.c with Fission.
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} $objfile object {debug}] != "" } {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index 202da0934b9..0a664a9b13c 100644
--- a/gdb/testsuite/gdb.dwarf2/formdata16.exp
+++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c formdata16-dw.S
+standard_testfile .c -dw.S
# We need to know the endianess in order
# to write some of the debugging info we'd like to generate.
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index dc88e948c99..7de2df452ae 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile .c implptrconst-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index c56f550339d..200e1e9915c 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile main.c implptrpiece-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index e270441392e..33ce4a00546 100644
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c ${gdb_test_file_name}-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index b0924c8096d..e5470ab7cba 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile main-subprogram.c enum-type-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index b22ff84e849..6c385118d4d 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile .cc method-ptr-dw.S
+standard_testfile .cc -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index f6c682b2cc0..56fd91ea4fd 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile main.c missing-sig-type-dw4.S
+standard_testfile main.c -dw4.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 93174657bbe..71b726f8f6f 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -21,7 +21,7 @@ load_lib dwarf.exp
if {![dwarf2_support]} { return 0 }
-standard_testfile main.c nonvar-access-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index d383b98dd94..118db2270d1 100644
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile opaque-type-lookup.c opaque-type-lookup-1.S opaque-type-lookup-2.c
+standard_testfile .c -1.S -2.c
# Create the DWARF.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/shortpiece.exp b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
index b4321bf8ec7..794ed5fd1f8 100644
--- a/gdb/testsuite/gdb.dwarf2/shortpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile main.c shortpiece-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index e43da0901da..5676951f676 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile main.c staticvirtual-dw.S
+standard_testfile main.c -dw.S
# Make DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index c99be95003e..e4d36eea6db 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue }
-standard_testfile method-ptr.cc subrange-dw.S
+standard_testfile method-ptr.cc -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 7976b4cd761..0b59567a03b 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
# This test can also only be run when we have python support in gdb,
# but that test can only be done after gdb has started, below.
-standard_testfile main.c symtab-producer-dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index e2b95adefe7..b8a1d64d190 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile void-type.c typedef-void-finish.S
+standard_testfile void-type.c .S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index ad531488409..a669b4c971a 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -44,7 +44,7 @@ if { [is_aarch64_target] } {
return
}
-standard_testfile .c ${gdb_test_file_name}-dw.S
+standard_testfile .c -dw.S
# Make some DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp
index 0250fafc7f8..55b0389bce1 100644
--- a/gdb/testsuite/gdb.dwarf2/variant.exp
+++ b/gdb/testsuite/gdb.dwarf2/variant.exp
@@ -23,7 +23,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .c variant.S
+standard_testfile .c .S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp
index 4ae00c3d256..0ffba34a189 100644
--- a/gdb/testsuite/gdb.dwarf2/void-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/void-type.exp
@@ -31,7 +31,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile void-type.c void-type.S
+standard_testfile .c .S
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d96515b5b18..f53df59f181 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5277,7 +5277,7 @@ proc cached_file { filename txt {executable 0}} {
# Without any arguments, the .exp file's base name is used to
# compute the source file name. The ".c" extension is added in this case.
# If ARGS is not empty, each entry is a source file specification.
-# If the specification starts with a ".", it is treated as a suffix
+# If the specification starts with a "." or "-", it is treated as a suffix
# to append to the .exp file's base name.
# If the specification is the empty string, it is treated as if it
# were ".c".
@@ -5324,8 +5324,11 @@ proc standard_testfile {args} {
# Handle an extension.
if {$arg == ""} {
set arg $testfile.c
- } elseif {[string range $arg 0 0] == "."} {
- set arg $testfile$arg
+ } else {
+ set first [string range $arg 0 0]
+ if { $first == "." || $first == "-" } {
+ set arg $testfile$arg
+ }
}
set $varname $arg