This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob/testsuite/mi] add #include lines for gcc HEAD
- From: mec dot gnu at mindspring dot com (Michael Chastain)
- To: cagney at redhat dot com, ezannoni at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 25 Aug 2004 09:50:03 -0400 (EDT)
- Subject: [ob/testsuite/mi] add #include lines for gcc HEAD
Here is the money patch. This patch fixes most of gdb.mi/*.c to compile
with gcc HEAD.
I tested this on:
native i686-pc-linux-gnu
gcc 2.95.3 3.3.4 3.4.1 HEAD-20040824
dwarf-2, stabs+.
With the released gcc's, the test results are unchanged.
With gcc HEAD, this fixes about one thousand ERROR, WARNING,
FAIL, and UNRESOLVED results.
I claim this is obvious. I'll leave it up for 24 hours for any
comments or objections.
2004-08-25 Michael Chastain <mec.gnu@mindspring.com>
* gdb.mi/basics.c: Include <stdio.h>.
* gdb.mi/pthreads.c: Include <stdlib.h>.
* gdb.mi/var-cmd.c: Include <stdlib.h>.
Index: gdb.mi/basics.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/basics.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 basics.c
*** gdb.mi/basics.c 25 Aug 2004 00:54:53 -0000 1.4
--- gdb.mi/basics.c 25 Aug 2004 12:45:02 -0000
***************
*** 1,4 ****
! /* Copyright 1999, 2000
Free Software Foundation, Inc.
This file is part of GDB.
--- 1,4 ----
! /* Copyright 1999, 2000, 2004
Free Software Foundation, Inc.
This file is part of GDB.
***************
*** 23,28 ****
--- 23,30 ----
* on function calls. Useful to test printing frames, stepping, etc.
*/
+ #include <stdio.h>
+
int callee4 (void)
{
int A=1;
Index: gdb.mi/pthreads.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/pthreads.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 pthreads.c
*** gdb.mi/pthreads.c 8 Jan 2004 21:43:39 -0000 1.6
--- gdb.mi/pthreads.c 25 Aug 2004 12:45:02 -0000
***************
*** 24,29 ****
--- 24,30 ----
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+ #include <stdlib.h>
#include <pthread.h>
/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
Index: gdb.mi/var-cmd.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/var-cmd.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 var-cmd.c
*** gdb.mi/var-cmd.c 25 Aug 2004 00:54:53 -0000 1.2
--- gdb.mi/var-cmd.c 25 Aug 2004 12:45:02 -0000
***************
*** 1,4 ****
! /* Copyright 1999 Free Software Foundation, Inc.
This file is part of GDB.
--- 1,4 ----
! /* Copyright 1999, 2004 Free Software Foundation, Inc.
This file is part of GDB.
***************
*** 17,22 ****
--- 17,24 ----
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+ #include <stdlib.h>
+
struct _simple_struct {
int integer;
unsigned int unsigned_integer;