forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
2020-07-03 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2020-07-03 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* gdb.base/m32rovly.c: Delete.
|
||||
|
||||
@@ -55,21 +55,10 @@ proc start_scalars_test { type } {
|
||||
set testfile "call-sc-${type}"
|
||||
|
||||
set binfile [standard_output_file ${testfile}]
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
|
||||
# built the second test case since we can't use prototypes
|
||||
warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
|
||||
untested "failed to compile"
|
||||
return -1
|
||||
}
|
||||
if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# Make certain that the output is consistent
|
||||
with_test_prefix "testfile=$testfile" {
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
#include "ovlymgr.h"
|
||||
|
||||
extern int foo PARAMS((int));
|
||||
extern int bar PARAMS((int));
|
||||
extern int baz PARAMS((int));
|
||||
extern int grbx PARAMS((int));
|
||||
extern int foo (int);
|
||||
extern int bar (int);
|
||||
extern int baz (int);
|
||||
extern int grbx (int);
|
||||
|
||||
int main ()
|
||||
{
|
||||
|
||||
@@ -2,16 +2,9 @@
|
||||
* Sample runtime overlay manager.
|
||||
*/
|
||||
|
||||
#ifdef NO_PROTOTYPES
|
||||
#define PARAMS(paramlist) ()
|
||||
#else
|
||||
#define PARAMS(paramlist) paramlist
|
||||
#endif
|
||||
|
||||
typedef enum { FALSE, TRUE } bool;
|
||||
|
||||
/* Entry Points: */
|
||||
|
||||
bool OverlayLoad PARAMS((unsigned long ovlyno));
|
||||
bool OverlayUnload PARAMS((unsigned long ovlyno));
|
||||
|
||||
bool OverlayLoad (unsigned long ovlyno);
|
||||
bool OverlayUnload (unsigned long ovlyno);
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set prototypes 1
|
||||
|
||||
# Build programs in PIE mode, to reproduce PR 21555.
|
||||
foreach_with_prefix opts {
|
||||
{ "" "" }
|
||||
|
||||
@@ -66,21 +66,10 @@ proc start_structs_test { types } {
|
||||
}
|
||||
|
||||
set binfile [standard_output_file ${testfile}]
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
|
||||
# built the second test case since we can't use prototypes
|
||||
warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
|
||||
untested "failed to compile"
|
||||
return -1
|
||||
}
|
||||
if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# Make certain that the output is consistent
|
||||
with_test_prefix "types=$types" {
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set prototypes 1
|
||||
standard_testfile .c
|
||||
|
||||
# Create and source the file that provides information about the compiler
|
||||
@@ -22,30 +21,15 @@ if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
# build the first test case
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
# built the second test case since we can't use prototypes
|
||||
warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
|
||||
untested "failed to compile"
|
||||
return -1
|
||||
}
|
||||
set prototypes 0
|
||||
if { [prepare_for_testing "failed to prepare" $binfile $srcfile {debug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set width 0"
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "can't run to main"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Ok, we're finally ready to actually do our tests.
|
||||
|
||||
gdb_test "f" \
|
||||
".*bkpt = 0.*" \
|
||||
"structs2 sanity check"
|
||||
@@ -67,9 +51,3 @@ if [test_compiler_info gcc-3-*] {
|
||||
gdb_test "continue" \
|
||||
".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
|
||||
"structs2 continue2"
|
||||
|
||||
# End of tests.
|
||||
|
||||
gdb_stop_suppressing_tests
|
||||
|
||||
return 0
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
|
||||
|
||||
set prototypes 0
|
||||
|
||||
standard_testfile .c
|
||||
|
||||
if [get_compiler_info] {
|
||||
|
||||
Reference in New Issue
Block a user