This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: osabi.c correctness patch (Was: new build failure)


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> There's another build bug after this one.

I chased down a number of -Werror problems, all relating to
gdb_string.h.  The appended patch obsoletes the one I just sent.
Tested on x86 Red Hat Linux 7.3.

It would be simpler to just include gdb_string.h in defs.h.
I didn't do that as that doesn't seem to be the gdb style.

Note that even with this patch we don't build with -Werror.  I'm
giving up.  I need a working gdb today, for my primary task.  I don't
know what happened here; I thought -Werror builds worked fine just a
couple months ago.


The remaining problem is this:

gcc -c -Wall -g -O2    -I. -I../../../src/gdb/gdbserver -I../../../src/gdb/gdbserver/../regformats -I../../../src/gdb/gdbserver/../../include -I../../bfd -I../../../src/gdb/gdbserver/../../bfd ../../../src/gdb/gdbserver/gdbreplay.c
../../../src/gdb/gdbserver/gdbreplay.c: In function `perror_with_name':
../../../src/gdb/gdbserver/gdbreplay.c:65: warning: implicit declaration of function `alloca'
../../../src/gdb/gdbserver/gdbreplay.c:71: warning: implicit declaration of function `exit'
../../../src/gdb/gdbserver/gdbreplay.c: In function `remote_open':
../../../src/gdb/gdbserver/gdbreplay.c:112: warning: implicit declaration of function `atoi'


There might be more after this.  I haven't been using `make -k'.


Ok to commit?

Tom


Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Makefile.in (osabi.o, i387-tdep.o, i386-linux-nat.o, lin-lwp.o,
	ax-gdb.o, signals.o, jv-valprint.o, c-valprint.o, cp-abi.o):
	Update dependencies.
	* i387-tdep.c: Include gdb_string.h.
	* osabi.c: Likewise.
	* i386-linux-nat.c: Likewise.
	* lin-lwp.c: Likewise.
	* ax-gdb.c: Likewise.
	* signals/signals.c: Likewise.
	* jv-valprint.c: Likewise.
	* p-lang.c: Likewise.
	* c-valprint.c: Likewise.
	* cp-abi.c: Likewise.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.250
diff -u -r1.250 Makefile.in
--- Makefile.in 27 Aug 2002 19:06:34 -0000 1.250
+++ Makefile.in 27 Aug 2002 20:42:10 -0000
@@ -1557,7 +1557,8 @@
 	$(gdb_string_h)
 
 c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(cp_abi_h)
+	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(cp_abi_h) \
+	$(gdb_string_h)
 
 doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) $(gdbtypes_h) \
 	$(gdb_assert_h) $(gdb_string_h)
@@ -1622,7 +1623,7 @@
 	$(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) $(cli_decode_h) \
 	$(gdb_string_h)
 
-cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h)
+cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(gdb_string_h)
 
 cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
 	$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
@@ -1740,7 +1741,7 @@
 	$(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
 	$(target_h) $(value_h) $(gdb_string_h) $(wrapper_h) $(cp_abi_h)
 
-osabi.o: osabi.c $(defs_h) $(BFD_SRC)/elf-bfd.h
+osabi.o: osabi.c $(gdb_string_h) $(defs_h) $(BFD_SRC)/elf-bfd.h
 
 go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
 	$(command_h) $(floatformat_h) $(target_h) i387-tdep.h $(regcache_h)
@@ -1753,7 +1754,7 @@
 
 gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
 	$(gdb_assert_h) $(gdb_string_h)
- 
+
 h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
 	$(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
 	$(regcache_h)
@@ -1815,7 +1816,8 @@
 
 i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h) \
-	$(i386_linux_tdep_h) $(i386_tdep_h) $(i387_tdep_h)
+	$(i386_linux_tdep_h) $(i386_tdep_h) $(i387_tdep_h) \
+	$(gdb_string_h)
 
 i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
 	$(value_h) $(regcache_h)
@@ -1823,7 +1825,8 @@
 i386v4-nat.o: i386v4-nat.c $(defs_h) $(regcache_h)
 
 i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
-	$(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h
+	$(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h \
+	$(gdb_string_h)
 
 # OBSOLETE i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
 # OBSOLETE 	$(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
@@ -1871,7 +1874,8 @@
 
 jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
 	$(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
-	$(language_h) jv-lang.h $(c_lang_h) gdbcore.h $(annotate_h)
+	$(language_h) jv-lang.h $(c_lang_h) gdbcore.h $(annotate_h) \
+	$(gdb_string_h)
 
 kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \
 	kod.h
@@ -2100,7 +2104,7 @@
 	$(objfiles_h) $(target_h) $(regcache_h)
 
 lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_wait_h) $(gdbthread_h) \
-	$(inferior_h) $(target_h) $(gdbcmd_h) $(regcache_h)
+	$(inferior_h) $(target_h) $(gdbcmd_h) $(regcache_h) $(gdb_string_h)
 
 proc-service.o: proc-service.c $(defs_h) $(inferior_h) gdb_proc_service.h \
 	$(symtab_h) $(target_h) gregset.h
@@ -2297,7 +2301,8 @@
 ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h)
 
 ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
-	$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
+	$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h \
+	$(gdb_string_h)
 
 sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
@@ -2612,7 +2617,7 @@
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the mi directory.
 
-signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h)
+signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h) $(gdb_string_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
 
 #
Index: ax-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-gdb.c,v
retrieving revision 1.13
diff -u -r1.13 ax-gdb.c
--- ax-gdb.c 13 May 2002 14:00:35 -0000 1.13
+++ ax-gdb.c 27 Aug 2002 20:42:11 -0000
@@ -30,6 +30,7 @@
 #include "target.h"
 #include "ax.h"
 #include "ax-gdb.h"
+#include "gdb_string.h"
 
 /* To make sense of this file, you should read doc/agentexpr.texi.
    Then look at the types and enums in ax-gdb.h.  For the code itself,
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.13
diff -u -r1.13 c-valprint.c
--- c-valprint.c 5 Feb 2002 21:41:29 -0000 1.13
+++ c-valprint.c 27 Aug 2002 20:42:13 -0000
@@ -21,6 +21,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "gdb_string.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
Index: cp-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-abi.c,v
retrieving revision 1.3
diff -u -r1.3 cp-abi.c
--- cp-abi.c 4 Jan 2002 18:20:19 -0000 1.3
+++ cp-abi.c 27 Aug 2002 20:42:13 -0000
@@ -21,6 +21,7 @@
 #include "defs.h"
 #include "value.h"
 #include "cp-abi.h"
+#include "gdb_string.h"
 
 struct cp_abi_ops current_cp_abi;
 
Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.40
diff -u -r1.40 i386-linux-nat.c
--- i386-linux-nat.c 15 Jun 2002 16:43:54 -0000 1.40
+++ i386-linux-nat.c 27 Aug 2002 20:42:13 -0000
@@ -25,6 +25,7 @@
 #include "regcache.h"
 
 #include "gdb_assert.h"
+#include "gdb_string.h"
 #include <sys/ptrace.h>
 #include <sys/user.h>
 #include <sys/procfs.h>
Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.22
diff -u -r1.22 i387-tdep.c
--- i387-tdep.c 19 Aug 2002 11:52:36 -0000 1.22
+++ i387-tdep.c 27 Aug 2002 20:42:13 -0000
@@ -28,6 +28,7 @@
 #include "floatformat.h"
 #include "regcache.h"
 #include "gdb_assert.h"
+#include "gdb_string.h"
 #include "doublest.h"
 
 #include "i386-tdep.h"
Index: jv-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-valprint.c,v
retrieving revision 1.10
diff -u -r1.10 jv-valprint.c
--- jv-valprint.c 9 May 2002 18:23:41 -0000 1.10
+++ jv-valprint.c 27 Aug 2002 20:42:14 -0000
@@ -30,6 +30,7 @@
 #include "jv-lang.h"
 #include "c-lang.h"
 #include "annotate.h"
+#include "gdb_string.h"
 
 /* Local functions */
 
Index: lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.34
diff -u -r1.34 lin-lwp.c
--- lin-lwp.c 31 Mar 2002 15:10:38 -0000 1.34
+++ lin-lwp.c 27 Aug 2002 20:42:15 -0000
@@ -21,6 +21,7 @@
 #include "defs.h"
 
 #include "gdb_assert.h"
+#include "gdb_string.h"
 #include <errno.h>
 #include <signal.h>
 #include <sys/ptrace.h>
Index: osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.6
diff -u -r1.6 osabi.c
--- osabi.c 18 Aug 2002 17:59:57 -0000 1.6
+++ osabi.c 27 Aug 2002 20:42:15 -0000
@@ -19,6 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "gdb_string.h"
 #include "osabi.h"
 
 #include "elf-bfd.h"
Index: p-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/p-lang.c,v
retrieving revision 1.8
diff -u -r1.8 p-lang.c
--- p-lang.c 13 May 2002 14:00:36 -0000 1.8
+++ p-lang.c 27 Aug 2002 20:42:15 -0000
@@ -20,6 +20,7 @@
 /* This file is derived from c-lang.c */
 
 #include "defs.h"
+#include "gdb_string.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
Index: signals/signals.c
===================================================================
RCS file: /cvs/src/src/gdb/signals/signals.c,v
retrieving revision 1.4
diff -u -r1.4 signals.c
--- signals/signals.c 9 Jun 2002 19:42:11 -0000 1.4
+++ signals/signals.c 27 Aug 2002 20:42:26 -0000
@@ -25,6 +25,7 @@
 #else
 #include "defs.h"
 #include "target.h"
+#include "gdb_string.h"
 #endif
 
 #include <signal.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]