]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Remove hardcoded filenames in gdb.dwarf2/*.exp
authorTom de Vries <tdevries@suse.de>
Fri, 16 Oct 2020 22:10:31 +0000 (00:10 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 16 Oct 2020 22:10:31 +0000 (00:10 +0200)
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.

64 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
gdb/testsuite/gdb.dwarf2/arr-stride.exp
gdb/testsuite/gdb.dwarf2/arr-subrange.exp
gdb/testsuite/gdb.dwarf2/atomic-type.c [moved from gdb/testsuite/gdb.dwarf2/atomic.c with 100% similarity]
gdb/testsuite/gdb.dwarf2/atomic-type.exp
gdb/testsuite/gdb.dwarf2/bad-regnum.exp
gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
gdb/testsuite/gdb.dwarf2/corrupt.exp
gdb/testsuite/gdb.dwarf2/count.exp
gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
gdb/testsuite/gdb.dwarf2/data-loc.exp
gdb/testsuite/gdb.dwarf2/dw2-align.exp
gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges-2.c [moved from gdb/testsuite/gdb.dwarf2/dw2-ranges2.c with 100% similarity]
gdb/testsuite/gdb.dwarf2/dw2-ranges-3.c [moved from gdb/testsuite/gdb.dwarf2/dw2-ranges3.c with 100% similarity]
gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges-main.c [deleted file]
gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
gdb/testsuite/gdb.dwarf2/enum-type.exp
gdb/testsuite/gdb.dwarf2/fission-mix-2.c [moved from gdb/testsuite/gdb.dwarf2/fission-mix2.c with 100% similarity]
gdb/testsuite/gdb.dwarf2/fission-mix.exp
gdb/testsuite/gdb.dwarf2/formdata16.exp
gdb/testsuite/gdb.dwarf2/implptrconst.exp
gdb/testsuite/gdb.dwarf2/implptrpiece.exp
gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
gdb/testsuite/gdb.dwarf2/main-subprogram.exp
gdb/testsuite/gdb.dwarf2/method-ptr.exp
gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
gdb/testsuite/gdb.dwarf2/nonvar-access.exp
gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
gdb/testsuite/gdb.dwarf2/shortpiece.exp
gdb/testsuite/gdb.dwarf2/staticvirtual.exp
gdb/testsuite/gdb.dwarf2/subrange.exp
gdb/testsuite/gdb.dwarf2/symtab-producer.exp
gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
gdb/testsuite/gdb.dwarf2/var-access.exp
gdb/testsuite/gdb.dwarf2/variant.exp
gdb/testsuite/gdb.dwarf2/void-type.exp
gdb/testsuite/lib/gdb.exp

index 95ec80b14df8e9280de1bde24f0b2f178db6f28c..50d21cb30270f43608d67129f661d4b7d54f246d 100644 (file)
@@ -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".
index c10a592df744cf672656096f8081eb6cccc8692c..0b440c8e6daf8a3a7023fabda8d778aa6b5ca562 100644 (file)
@@ -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.
 
index fd0928f610cc875b5efe65f31d74ae8af2d50e38..698562de92f780d9ee4858c7cbcf000d4c4f078d 100644 (file)
@@ -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.
index 61c280e4f9719f70c3520c186e598510cfa346a0..e8bff357b06f77b838e559c26c211d667a7684ae 100644 (file)
@@ -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]
index 4e355ff5c164c9aee9604cfeff9380fc20424309..7c8250413b022ab278d955caed671c1c37139cea 100644 (file)
@@ -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]
index 9a44686f438df0784e47ef306cfdb618e8c959b5..d28af05d26e73d52c3fb157ff819458ee01e8939 100644 (file)
@@ -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.
 
index 54eb2eaceae79a31a65023d98ca7f7c42d81d48f..5a4d91d911a23d4f305de77dadf45cb71acd050e 100644 (file)
@@ -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]
index 344d7da0d54b21ca79cffe9690725fb744f04c86..552b298fabef6ac92a9046d953d9f69511ca2c34 100644 (file)
@@ -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] } {
index 43d7801c0d9515db08ddd2d76196fb7bbc31e5ea..c5d39ebfb143af0e057a280d35b90ecad4793e49 100644 (file)
@@ -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 \
index 149c1263c90143f20077f075f5dd8efab174ef3e..9656d7ec1ace355aeccc4cace3b72694fb5f2628 100644 (file)
@@ -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
index 162848be941de95941878f310919d158ec559880..cb1741fcaf3053fc50d1dcf2a676701b2cb18858 100644 (file)
@@ -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
index 971ec71bb4a9503d375b72f02ededd949c033874..d89beb596e9e5ad818f822d128930853b2376ef3 100644 (file)
@@ -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.
 #
index b55a97cec748dc3598e115cbbabaccdae436418c..5cefb15da4af84f0f95cffac3bbad737e909f2b2 100644 (file)
@@ -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 {
index 7ff49380292b870b5c53262204f21323a88bedbb..f2c88b9b553dea1f96924f92591dee98960ac43e 100644 (file)
@@ -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]
index de21dffa1e4ec9222f107cf5adfdfc9708d57f58..ce4062eba3c11b0518c2590025bf64e113884237 100644 (file)
@@ -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.
index ef8b52c4f4c3e04eb10c71cbea38895008eeaff2..640216ae19213d19fe6a117e9b4b5d09baea6693 100644 (file)
@@ -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.
 
index f6fe54a634f508cc1235a240d31c15e2c4d3914c..c06a605e5deb06737b6de236f5e774fbeb72ee44 100644 (file)
@@ -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]
index 986de0c526dbfc543f6f234924237e2d0174c5bd..238297c76ae6e7cdfd6f6c7c9d2830bf7bbc7339 100644 (file)
@@ -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.
 
index 5e22ef37938d9737d24687cbf90ad1f04d7e5117..44d5faa97bdfc609bfe3308a699b7d69ad66ab70 100644 (file)
@@ -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.
index 4b56469e6224211b89884b648024e73e9b37a320..0be2d89d4fd42518b360e29fa30b42020c271c3b 100644 (file)
@@ -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
index 73f29e0d9de49244e04dbbac973379475812dfc2..a4fd4aa92fc8c9f0f0c63e2c3759f24e2a5eca31 100644 (file)
@@ -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] {}] } {
index 32ae5ed66aad492a8e8e702e66fcb520ae8455d3..d299dc353ffa85d5971aac18f391e23d5a6a7144 100644 (file)
@@ -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]
index e826825eb4b2705960d45a03117db46f17ef2fb5..935d519934cc3058600c8650c6ce0769afaab798 100644 (file)
@@ -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 {
index 1c1e75619dad6bac43ffc55ca90361869eeffb2c..ad48588a19a9f72e3d346c06c223ee5a973ff299 100644 (file)
@@ -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}] } {
index 12a60a01edd5bed9db5e91100c4ad243ae430536..69d1c42266c2b3e13497b96798e387a484edfd57 100644 (file)
@@ -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 {
index 1632d5e898985bea54c9e908c743de9aac39f4ca..24fbb717b2280c1b99fcf56a148bf174dbcb4c2c 100644 (file)
@@ -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 {
index 745af0409fab1346e5f1f21f6b2cb7adb5aeb55d..b2b4308744ef6edb9c900a7bf3df2ed808360902 100644 (file)
@@ -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 {
index 62e655a0ee8f9967a7994b22e59025afdc6322a0..30045a9be929a097f9889ddf0299ee8fcd3a5320 100644 (file)
@@ -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 {
index 12011b5f9c0a6f171464491b53359eba58413a88..164397e81e75ec0c375d2ce3d72fafa1eb257fe2 100644 (file)
@@ -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 {
index 5b61a6ba92889cb3b2c9c9918a803968c0a813e6..a6d9a500287d45be982993c006b44d271ceff7b9 100644 (file)
@@ -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 {
index d6e309d0d73b2c53c6ccfeaa06bd29b0f167939f..496eddcc8618bf5de50d064c5e9c28e532926293 100644 (file)
@@ -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
index 9cf6aa73816e727400e21e85cb07fa89323f0cab..e694fe12e61a6f1219b609362bc2b423f8ab1e00 100644 (file)
@@ -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}] } {
index 39281a8857f61baabd5851bdb2be417b0aaa2f6b..0d363b1a443d76d73598850bc09cf9af2c46c244 100644 (file)
@@ -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 (file)
index 7d23288..0000000
+++ /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;
-}
index 7a33e35278bb3c0d7f934e44b8f73d39a304e3cb..4ced125cd18a025d224146af979367fb233905ec 100644 (file)
@@ -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.
index 05cc4318f3d24f75fb2a7cb46eb7d2e840caf83a..adddc93ff4ca82aa48f386260e0c10c29931e890 100644 (file)
@@ -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]
index fd1ec1e106b7f038a919ff7bd2e0b5ed646a45e6..1ff7b66587f8aa213d4ba13f508aa6e5f5699c99 100644 (file)
@@ -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
index 92db7eaa51487dc4ce0c318266118ce057131a15..08f0e29b7e2d8ff355420334171729946e4a1a18 100644 (file)
@@ -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 {
index 35579f7b6fa104d54f2ab9e40c9a1fc0decb6098..05edca580e81e3cb5cfd9a1cf5d92f53f8b46c5e 100644 (file)
@@ -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,
index 2f6b17c6dc567abe82d41884a1d4fea6ade13619..fbbcd3b88d36c985e86d17f9fc7dbb8afd5a93ae 100644 (file)
@@ -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.
index d61c1455587c19a1d1a23b7a89e600b4ae83445f..0b12d19453aa8e7e2c504964735e5f28ee80491f 100644 (file)
@@ -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]
index cede8cb84a180c1eabe1f76811ae99bca34c9a7b..d738a03c3fdb0c3329e4fdc173c485292d451ef3 100644 (file)
@@ -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
 }
index 202da0934b9aef07fae55e04f7131fa9b22f8e8c..0a664a9b13c21ca05d66973a66003b69964e22c7 100644 (file)
@@ -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.
index dc88e948c99db60fdad1973dd0aca759e8d17961..7de2df452ae76d1096e674457b66b8734ff7417d 100644 (file)
@@ -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]
index c56f550339dda22f1404b9ef4e6bb81cdd916010..200e1e9915cc258f13c4373cf915c21f75b0bac4 100644 (file)
@@ -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]
index e270441392e05a124045f14a325c31f0f7869513..33ce4a005462afdfb53d627cad221c96b7435049 100644 (file)
@@ -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.
 
index b0924c8096df4dbf4f38559b1105de9eb3d75423..e5470ab7cba494bb70f23c42218256eca5f9728f 100644 (file)
@@ -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]
index b22ff84e849eecef367cea6781f8e09a4f9e61b8..6c385118d4d9365d6b46c4d3db246e30cb3a428d 100644 (file)
@@ -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]
index f6c682b2cc04b6fa816e7f2a7194efe560116197..56fd91ea4fd215f8a7a07190cea40e5e8b153d2f 100644 (file)
@@ -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]
index 93174657bbe4b0f3d388751c93d6bf138f8a673c..71b726f8f6f5ccead2cda2565ecf6498734054dd 100644 (file)
@@ -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]
index d383b98dd94d19f9aff59feeac4a20ae0203d8ec..118db2270d1ab07db1129caf389ede0e70d6c217 100644 (file)
@@ -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]
index b4321bf8ec70a32363780c7f8df578d10cdf6b5b..794ed5fd1f882f0b482d2d4795a2501f974b81ea 100644 (file)
@@ -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]
index e43da0901dad72c04ae1cc50e230bd6382503418..5676951f6761cbb60769b89eb9b208f22a4a48b6 100644 (file)
@@ -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]
index c99be95003ee9689f88618dc5da6d349743ab819..e4d36eea6dbd8039e0a135ffcb35f4f5fb0fd69a 100644 (file)
@@ -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]
index 7976b4cd7611660ea314978d6bd40c1447e2966b..0b59567a03be50fb189eeb74f8710cb32444e6b7 100644 (file)
@@ -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]
index e2b95adefe768f8aeb83ef88d6929fbf76d60b54..b8a1d64d1909d6097c54b0623026275f60043204 100644 (file)
@@ -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]
index ad531488409a0d614c236f78d1674fb2e997ddd2..a669b4c971a1a5b1d68e6fd5b2caf10905770bfc 100644 (file)
@@ -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.
 
index 0250fafc7f8eac61c2f53e5af34da060031b0ae6..55b0389bce1d73fd6477b19f0a91f1eabcc991f6 100644 (file)
@@ -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]
index 4ae00c3d256828d13d3b94ccc888da80f33737f0..0ffba34a189c0f87626c8241220da32edbfed672 100644 (file)
@@ -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]
index d96515b5b181391af5d36b339a56a2429126ad3c..f53df59f1813cc976415fd9eabee43b0de1cab11 100644 (file)
@@ -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