summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-10-20 10:20:25 +0200
committerTom de Vries <tdevries@suse.de>2020-10-20 10:20:25 +0200
commit8c1613603dcbe01403340fd09b055173d854ba73 (patch)
tree075055a37891292d0562083eb16cc479e2580919
parent9c2412ec7fe51e8c2a4c15b0f17900a3df945b1d (diff)
downloadbinutils-gdb-8c1613603dcbe01403340fd09b055173d854ba73.tar.gz
[gdb/testsuite] Use main.c in gdb.dwarf2
Eliminate copies of main.c in gdb.dwarf2. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-10-20 Tom de Vries <tdevries@suse.de> * gdb.dwarf2/arr-stride.c: Remove. * gdb.dwarf2/arr-stride.exp: Use main.c. * gdb.dwarf2/arr-subrange.c: Remove. * gdb.dwarf2/arr-subrange.exp: Use main.c. * gdb.dwarf2/bad-regnum.c: Remove. * gdb.dwarf2/bad-regnum.exp: Use main.c. * gdb.dwarf2/corrupt.c: Remove. * gdb.dwarf2/corrupt.exp: Use main.c. * gdb.dwarf2/dw2-bad-elf.c: Remove. * gdb.dwarf2/dw2-bad-elf.exp: Use main.c. * gdb.dwarf2/dw2-icycle.c: Remove. * gdb.dwarf2/dw2-icycle.exp: Use main.c. * gdb.dwarf2/formdata16.c: Remove. * gdb.dwarf2/formdata16.exp: Use main.c. * gdb.dwarf2/implptrconst.c: Remove. * gdb.dwarf2/implptrconst.exp: Use main.c. * gdb.dwarf2/info-locals-optimized-out.c: Remove. * gdb.dwarf2/info-locals-optimized-out.exp: Use main.c. * gdb.dwarf2/opaque-type-lookup.c: Remove. * gdb.dwarf2/opaque-type-lookup.exp: Use main.c.
-rw-r--r--gdb/testsuite/ChangeLog23
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-stride.c20
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-stride.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-subrange.c21
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-subrange.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/bad-regnum.c22
-rw-r--r--gdb/testsuite/gdb.dwarf2/bad-regnum.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/corrupt.c24
-rw-r--r--gdb/testsuite/gdb.dwarf2/corrupt.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-elf.c21
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icycle.c24
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icycle.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/formdata16.c22
-rw-r--r--gdb/testsuite/gdb.dwarf2/formdata16.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.c22
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.c23
-rw-r--r--gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c23
-rw-r--r--gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp2
21 files changed, 33 insertions, 232 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 291599589ec..8ece61dc4a3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,28 @@
2020-10-20 Tom de Vries <tdevries@suse.de>
+ * gdb.dwarf2/arr-stride.c: Remove.
+ * gdb.dwarf2/arr-stride.exp: Use main.c.
+ * gdb.dwarf2/arr-subrange.c: Remove.
+ * gdb.dwarf2/arr-subrange.exp: Use main.c.
+ * gdb.dwarf2/bad-regnum.c: Remove.
+ * gdb.dwarf2/bad-regnum.exp: Use main.c.
+ * gdb.dwarf2/corrupt.c: Remove.
+ * gdb.dwarf2/corrupt.exp: Use main.c.
+ * gdb.dwarf2/dw2-bad-elf.c: Remove.
+ * gdb.dwarf2/dw2-bad-elf.exp: Use main.c.
+ * gdb.dwarf2/dw2-icycle.c: Remove.
+ * gdb.dwarf2/dw2-icycle.exp: Use main.c.
+ * gdb.dwarf2/formdata16.c: Remove.
+ * gdb.dwarf2/formdata16.exp: Use main.c.
+ * gdb.dwarf2/implptrconst.c: Remove.
+ * gdb.dwarf2/implptrconst.exp: Use main.c.
+ * gdb.dwarf2/info-locals-optimized-out.c: Remove.
+ * gdb.dwarf2/info-locals-optimized-out.exp: Use main.c.
+ * gdb.dwarf2/opaque-type-lookup.c: Remove.
+ * gdb.dwarf2/opaque-type-lookup.exp: Use main.c.
+
+2020-10-20 Tom de Vries <tdevries@suse.de>
+
* gdb.dwarf2/ada-valprint-error.exp: Remove redundant mention of .exp
file.
* gdb.dwarf2/dw2-dir-file-name.exp: Same.
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.c b/gdb/testsuite/gdb.dwarf2/arr-stride.c
deleted file mode 100644
index 01087518a89..00000000000
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2014-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 (void)
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index e8bff357b06..a3d2239d6dc 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 .c -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/arr-subrange.c b/gdb/testsuite/gdb.dwarf2/arr-subrange.c
deleted file mode 100644
index 9bfe1d627f2..00000000000
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright 2014-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 (void)
-{
- asm ("main_label: .globl main_label");
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index 7c8250413b0..495d97e0fbd 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 .c -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/bad-regnum.c b/gdb/testsuite/gdb.dwarf2/bad-regnum.c
deleted file mode 100644
index ebcb0c6e31b..00000000000
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2015-2020 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index 5a4d91d911a..acd739f7a50 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 .c -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/corrupt.c b/gdb/testsuite/gdb.dwarf2/corrupt.c
deleted file mode 100644
index e99760d7a9c..00000000000
--- a/gdb/testsuite/gdb.dwarf2/corrupt.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2014-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/>. */
-
-/* Dummy main function. */
-
-int
-main (void)
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index d89beb596e9..f78c865fad8 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 .c .S
+standard_testfile main.c .S
# Make the DWARF used for the test.
#
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.c b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.c
deleted file mode 100644
index 8e6193ee597..00000000000
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.c
+++ /dev/null
@@ -1,21 +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 ()
-{
- asm ("main_label: .globl main_label");
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index c06a605e5de..a85d3430a75 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 .c -other.S -dwarf.S
+standard_testfile main.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-icycle.c b/gdb/testsuite/gdb.dwarf2/dw2-icycle.c
deleted file mode 100644
index 7d8ecfe10dd..00000000000
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2004-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/>. */
-
-/* Dummy main function. */
-
-int
-main()
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
index 4e8f01b2525..9a01808528c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
return 0
}
-standard_testfile .S .c
+standard_testfile .S main.c
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.c b/gdb/testsuite/gdb.dwarf2/formdata16.c
deleted file mode 100644
index dc9d154113a..00000000000
--- a/gdb/testsuite/gdb.dwarf2/formdata16.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2017-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/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index 0a664a9b13c..dc908a10f56 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 -dw.S
+standard_testfile main.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.c b/gdb/testsuite/gdb.dwarf2/implptrconst.c
deleted file mode 100644
index be3f852a79d..00000000000
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2013-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/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 7de2df452ae..2cd8bf89092 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 -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.c b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.c
deleted file mode 100644
index dc4137f9d66..00000000000
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2017-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 (void)
-{
- asm ("main_label: .globl main_label");
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index 33ce4a00546..210acc18641 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 -dw.S
+standard_testfile main.c -dw.S
# Make some DWARF for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c
deleted file mode 100644
index 3bd3f1fc1e7..00000000000
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2015-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()
-{
- asm ("main_label: .globl main_label");
- return 0;
-}
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index 118db2270d1..675992fc051 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 .c -1.S -2.c
+standard_testfile main.c -1.S -2.c
# Create the DWARF.
set asm_file [standard_output_file $srcfile2]