• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

GNU Binutils with patches for OS216


Commit MetaInfo

Revision2eb821570037e8836d61ab3dcb9331c21f8a64d9 (tree)
Zeit2020-07-03 22:58:20
AutorPedro Alves <palves@redh...>
CommiterPedro Alves

Log Message

Remove stale -DNO_PROTOTYPES bits from gdb testsuite

The gdb.base/call-sc.exp, gdb.base/structs.exp and
gdb.base/structs2.exp testcases still try compiling the sources with
-DNO_PROTOTYPES, but the corresponding sources don't have any #ifdef
NO_PROTOTYPES any longer. Those were removed throughout years ago.

OTOH, gdb.base/ovlymgr.h does check for NO_PROTOTYPES, but no .exp
file compiles it with -DNO_PROTOTYPES.

gdb.base/reread.exp and gdb.base/varargs.exp set a 'prototypes'
global, which is a stale bit left behind when the "try-compiling
without and then with -DNO_PROTOTYPES" logic was around.

gdb/testsuite/ChangeLog:

* gdb.base/call-sc.exp (start_scalars_test): Use
prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
* gdb.base/overlays.c: Remove references to PARAMS.
* gdb.base/ovlymgr.h (PARAMS): Delete, and remove all references.
* gdb.base/reread.exp: Don't set 'prototypes' global.
* gdb.base/structs.exp (start_structs_test): Use
prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
* gdb.base/structs2.exp: Don't set 'prototypes' global. Use
prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
Don't issue "set width 0". Remove gdb_stop_suppressing_tests
call.
* gdb.base/varargs.exp: Don't set 'prototypes' global.

Ändern Zusammenfassung

Diff

--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,20 @@
11 2020-07-03 Pedro Alves <palves@redhat.com>
22
3+ * gdb.base/call-sc.exp (start_scalars_test): Use
4+ prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
5+ * gdb.base/overlays.c: Remove references to PARAMS.
6+ * gdb.base/ovlymgr.h (PARAMS): Delete, and remove all references.
7+ * gdb.base/reread.exp: Don't set 'prototypes' global.
8+ * gdb.base/structs.exp (start_structs_test): Use
9+ prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
10+ * gdb.base/structs2.exp: Don't set 'prototypes' global. Use
11+ prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
12+ Don't issue "set width 0". Remove gdb_stop_suppressing_tests
13+ call.
14+ * gdb.base/varargs.exp: Don't set 'prototypes' global.
15+
16+2020-07-03 Pedro Alves <palves@redhat.com>
17+
318 * gdb.base/m32rovly.c: Delete.
419 * gdb.base/ovlymgr.c: Remove all code guarded by __D10V__.
520
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -55,21 +55,10 @@ proc start_scalars_test { type } {
5555 set testfile "call-sc-${type}"
5656
5757 set binfile [standard_output_file ${testfile}]
58- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
59- # built the second test case since we can't use prototypes
60- warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
61- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
62- untested "failed to compile"
63- return -1
64- }
58+ if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
59+ return -1
6560 }
6661
67- # Start with a fresh gdb.
68- gdb_exit
69- gdb_start
70- gdb_reinitialize_dir $srcdir/$subdir
71- gdb_load ${binfile}
72-
7362 # Make certain that the output is consistent
7463 with_test_prefix "testfile=$testfile" {
7564 gdb_test_no_output "set print sevenbit-strings"
--- a/gdb/testsuite/gdb.base/overlays.c
+++ b/gdb/testsuite/gdb.base/overlays.c
@@ -3,10 +3,10 @@
33
44 #include "ovlymgr.h"
55
6-extern int foo PARAMS((int));
7-extern int bar PARAMS((int));
8-extern int baz PARAMS((int));
9-extern int grbx PARAMS((int));
6+extern int foo (int);
7+extern int bar (int);
8+extern int baz (int);
9+extern int grbx (int);
1010
1111 int main ()
1212 {
--- a/gdb/testsuite/gdb.base/ovlymgr.h
+++ b/gdb/testsuite/gdb.base/ovlymgr.h
@@ -2,16 +2,9 @@
22 * Sample runtime overlay manager.
33 */
44
5-#ifdef NO_PROTOTYPES
6-#define PARAMS(paramlist) ()
7-#else
8-#define PARAMS(paramlist) paramlist
9-#endif
10-
115 typedef enum { FALSE, TRUE } bool;
126
137 /* Entry Points: */
148
15-bool OverlayLoad PARAMS((unsigned long ovlyno));
16-bool OverlayUnload PARAMS((unsigned long ovlyno));
17-
9+bool OverlayLoad (unsigned long ovlyno);
10+bool OverlayUnload (unsigned long ovlyno);
--- a/gdb/testsuite/gdb.base/reread.exp
+++ b/gdb/testsuite/gdb.base/reread.exp
@@ -13,8 +13,6 @@
1313 # You should have received a copy of the GNU General Public License
1414 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16-set prototypes 1
17-
1816 # Build programs in PIE mode, to reproduce PR 21555.
1917 foreach_with_prefix opts {
2018 { "" "" }
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -66,21 +66,10 @@ proc start_structs_test { types } {
6666 }
6767
6868 set binfile [standard_output_file ${testfile}]
69- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
70- # built the second test case since we can't use prototypes
71- warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
72- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
73- untested "failed to compile"
74- return -1
75- }
69+ if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
70+ return -1
7671 }
7772
78- # Start with a fresh gdb.
79- gdb_exit
80- gdb_start
81- gdb_reinitialize_dir $srcdir/$subdir
82- gdb_load ${binfile}
83-
8473 # Make certain that the output is consistent
8574 with_test_prefix "types=$types" {
8675 gdb_test_no_output "set print sevenbit-strings"
--- a/gdb/testsuite/gdb.base/structs2.exp
+++ b/gdb/testsuite/gdb.base/structs2.exp
@@ -13,7 +13,6 @@
1313 # You should have received a copy of the GNU General Public License
1414 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16-set prototypes 1
1716 standard_testfile .c
1817
1918 # Create and source the file that provides information about the compiler
@@ -22,30 +21,15 @@ if [get_compiler_info] {
2221 return -1
2322 }
2423
25-# build the first test case
26-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
27- # built the second test case since we can't use prototypes
28- warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
29- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
30- untested "failed to compile"
31- return -1
32- }
33- set prototypes 0
24+if { [prepare_for_testing "failed to prepare" $binfile $srcfile {debug}] } {
25+ return -1
3426 }
3527
36-# Start with a fresh gdb.
37-
38-clean_restart ${binfile}
39-
40-gdb_test_no_output "set width 0"
41-
4228 if ![runto_main] then {
4329 fail "can't run to main"
4430 return 0
4531 }
4632
47-# Ok, we're finally ready to actually do our tests.
48-
4933 gdb_test "f" \
5034 ".*bkpt = 0.*" \
5135 "structs2 sanity check"
@@ -67,9 +51,3 @@ if [test_compiler_info gcc-3-*] {
6751 gdb_test "continue" \
6852 ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
6953 "structs2 continue2"
70-
71-# End of tests.
72-
73-gdb_stop_suppressing_tests
74-
75-return 0
--- a/gdb/testsuite/gdb.base/varargs.exp
+++ b/gdb/testsuite/gdb.base/varargs.exp
@@ -29,8 +29,6 @@
2929
3030
3131
32-set prototypes 0
33-
3432 standard_testfile .c
3533
3634 if [get_compiler_info] {