GNU Binutils with patches for OS216
リビジョン | 2eb821570037e8836d61ab3dcb9331c21f8a64d9 (tree) |
---|---|
日時 | 2020-07-03 22:58:20 |
作者 | Pedro Alves <palves@redh...> |
コミッター | Pedro Alves |
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.
@@ -1,5 +1,20 @@ | ||
1 | 1 | 2020-07-03 Pedro Alves <palves@redhat.com> |
2 | 2 | |
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 | + | |
3 | 18 | * gdb.base/m32rovly.c: Delete. |
4 | 19 | * gdb.base/ovlymgr.c: Remove all code guarded by __D10V__. |
5 | 20 |
@@ -55,21 +55,10 @@ proc start_scalars_test { type } { | ||
55 | 55 | set testfile "call-sc-${type}" |
56 | 56 | |
57 | 57 | 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 | |
65 | 60 | } |
66 | 61 | |
67 | - # Start with a fresh gdb. | |
68 | - gdb_exit | |
69 | - gdb_start | |
70 | - gdb_reinitialize_dir $srcdir/$subdir | |
71 | - gdb_load ${binfile} | |
72 | - | |
73 | 62 | # Make certain that the output is consistent |
74 | 63 | with_test_prefix "testfile=$testfile" { |
75 | 64 | gdb_test_no_output "set print sevenbit-strings" |
@@ -3,10 +3,10 @@ | ||
3 | 3 | |
4 | 4 | #include "ovlymgr.h" |
5 | 5 | |
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); | |
10 | 10 | |
11 | 11 | int main () |
12 | 12 | { |
@@ -2,16 +2,9 @@ | ||
2 | 2 | * Sample runtime overlay manager. |
3 | 3 | */ |
4 | 4 | |
5 | -#ifdef NO_PROTOTYPES | |
6 | -#define PARAMS(paramlist) () | |
7 | -#else | |
8 | -#define PARAMS(paramlist) paramlist | |
9 | -#endif | |
10 | - | |
11 | 5 | typedef enum { FALSE, TRUE } bool; |
12 | 6 | |
13 | 7 | /* Entry Points: */ |
14 | 8 | |
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); |
@@ -13,8 +13,6 @@ | ||
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | -set prototypes 1 | |
17 | - | |
18 | 16 | # Build programs in PIE mode, to reproduce PR 21555. |
19 | 17 | foreach_with_prefix opts { |
20 | 18 | { "" "" } |
@@ -66,21 +66,10 @@ proc start_structs_test { types } { | ||
66 | 66 | } |
67 | 67 | |
68 | 68 | 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 | |
76 | 71 | } |
77 | 72 | |
78 | - # Start with a fresh gdb. | |
79 | - gdb_exit | |
80 | - gdb_start | |
81 | - gdb_reinitialize_dir $srcdir/$subdir | |
82 | - gdb_load ${binfile} | |
83 | - | |
84 | 73 | # Make certain that the output is consistent |
85 | 74 | with_test_prefix "types=$types" { |
86 | 75 | gdb_test_no_output "set print sevenbit-strings" |
@@ -13,7 +13,6 @@ | ||
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | -set prototypes 1 | |
17 | 16 | standard_testfile .c |
18 | 17 | |
19 | 18 | # Create and source the file that provides information about the compiler |
@@ -22,30 +21,15 @@ if [get_compiler_info] { | ||
22 | 21 | return -1 |
23 | 22 | } |
24 | 23 | |
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 | |
34 | 26 | } |
35 | 27 | |
36 | -# Start with a fresh gdb. | |
37 | - | |
38 | -clean_restart ${binfile} | |
39 | - | |
40 | -gdb_test_no_output "set width 0" | |
41 | - | |
42 | 28 | if ![runto_main] then { |
43 | 29 | fail "can't run to main" |
44 | 30 | return 0 |
45 | 31 | } |
46 | 32 | |
47 | -# Ok, we're finally ready to actually do our tests. | |
48 | - | |
49 | 33 | gdb_test "f" \ |
50 | 34 | ".*bkpt = 0.*" \ |
51 | 35 | "structs2 sanity check" |
@@ -67,9 +51,3 @@ if [test_compiler_info gcc-3-*] { | ||
67 | 51 | gdb_test "continue" \ |
68 | 52 | ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \ |
69 | 53 | "structs2 continue2" |
70 | - | |
71 | -# End of tests. | |
72 | - | |
73 | -gdb_stop_suppressing_tests | |
74 | - | |
75 | -return 0 |
@@ -29,8 +29,6 @@ | ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | -set prototypes 0 | |
33 | - | |
34 | 32 | standard_testfile .c |
35 | 33 | |
36 | 34 | if [get_compiler_info] { |