From 639893384d5faeaa671f98dfc3ed169e9aa2ccc9 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Thu, 2 May 1991 03:39:15 +0000 Subject: [PATCH] Merge devo/bfd with GDB's bfd. Get getopt and obstack from -liberty rather than compiling them here. * coffread.c: turn a printf into a complain(), and try to deal more gracefully with botched-looking lineno pointers. * dbxread.c: Use bfd_get_symcount rather than bfd_get_symcount_upper_bound. Don't coredump on files with zero symbols in them (a BFD bug showed this one). * environ.c: Pass GNUTARGET into the parent (gdb) as well as the child. --- gdb/Makefile.dist | 39 ++++------- gdb/Makefile.in | 39 ++++------- gdb/coffread.c | 14 ++-- gdb/dbxread.c | 5 +- gdb/depend | 175 ++++++++++++++++++++++++++-------------------- gdb/environ.c | 1 + 6 files changed, 137 insertions(+), 136 deletions(-) diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index 0e4a788106b..6c5060b0729 100755 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -67,7 +67,7 @@ BFD_DEP = $$(BFD_DIR) # All the includes used for CFLAGS and for lint. # -I. for config files. -# -I${srcdir} for , possibly regex.h also. +# -I${srcdir} possibly for regex.h also. INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I${srcdir}/vx-share # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS. @@ -80,15 +80,8 @@ CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS} # (e.g. SunOS4) it is important to use the M_CFLAGS. LDFLAGS = $(CFLAGS) -# define this to be "obstack.o" if you don't have the obstack library installed -# so that the dependencies work right. -OBSTACK = obstack.o - -# Requires GNU getopt_long features. -GETOPT = getopt.o getopt1.o -# Where is the getopt directory? Traditionally ../getopt or ./getopt -GETOPT_DIR = ${srcdir}/../getopt -GETOPT_DEP = $$(GETOPT_DIR) +# Where is the "-liberty" library, containing getopt and obstack? +LIBIBERTY = ${srcdir}/../libiberty/libiberty.a # Flags that describe where you can find the termcap library. # You may need to make other arrangements for USG. @@ -101,11 +94,13 @@ TERMCAP = -ltermcap # {X,T}M_CLIBS, if defined, has system-dependent libs # For example, -lPW for System V to get alloca(). # FIXME STOPGAP FOR BFD LIBRARY: BFD stuff -CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}/libbfd.a -CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a +CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}/libbfd.a \ + ${LIBIBERTY} +CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a \ + ${LIBIBERTY} -ADD_FILES = ${OBSTACK} ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${GETOPT} -ADD_DEPS = ${OBSTACK} ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${GETOPT} +ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} +ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} VERSION = 3.94.3 DIST=gdb-$(VERSION) @@ -178,11 +173,9 @@ REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \ ansidecl.h stdlib.h gmalloc.h stddef.h -GETOPTSRC = $(GETOPT_DIR)/getopt.c $(GETOPT_DIR)/getopt1.c -POSSLIBS_MAINDIR = obstack.h obstack.c regex.c regex.h alloca.c \ - $(MALLOCSRC) -POSSLIBS = $(POSSLIBS_MAINDIR) $(GETOPTSRC) +POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC) +POSSLIBS = $(POSSLIBS_MAINDIR) TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c @@ -247,13 +240,12 @@ gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \ ${RL_LIB} $(CLIBS) -saber_gdb: $(SFILES) $(GETOPTSRC) $(DEPFILES) copying.c obstack.c version.c +saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #setopt load_flags $(CFLAGS) -I$(BFD_DIR) #load ./init.c $(SFILES) #unload ${srcdir}/expread.y #load ${srcdir}/expread.tab.c readline/libreadline.a #load copying.c version.c - #load obstack.c $(GETOPTSRC) #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` #load ${BFD_DIR}/libbfd.a -ltermcap ##void mcheck(a) void (*a)(); { } @@ -350,7 +342,6 @@ depend: $(SOURCES) Makefile.dist -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \ -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \ -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \ - -e 's; [a-z0-9./]*getopt/; $(GETOPT_DEP)/;g' \ -e 's; \./; $${srcdir}/;g' \ >depend $(MAKE_MAKEFILE) @@ -454,12 +445,6 @@ mipsread.o: ${srcdir}/mipsread.c # Drag in the files that are in another directory. -getopt1.o: $(GETOPT_DIR)/getopt1.c - ${CC} -c ${CFLAGS} $(GETOPT_DIR)/getopt1.c - -getopt.o: $(GETOPT_DIR)/getopt.c - ${CC} -c ${CFLAGS} $(GETOPT_DIR)/getopt.c - xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 0e4a788106b..6c5060b0729 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -67,7 +67,7 @@ BFD_DEP = $$(BFD_DIR) # All the includes used for CFLAGS and for lint. # -I. for config files. -# -I${srcdir} for , possibly regex.h also. +# -I${srcdir} possibly for regex.h also. INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I${srcdir}/vx-share # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS. @@ -80,15 +80,8 @@ CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS} # (e.g. SunOS4) it is important to use the M_CFLAGS. LDFLAGS = $(CFLAGS) -# define this to be "obstack.o" if you don't have the obstack library installed -# so that the dependencies work right. -OBSTACK = obstack.o - -# Requires GNU getopt_long features. -GETOPT = getopt.o getopt1.o -# Where is the getopt directory? Traditionally ../getopt or ./getopt -GETOPT_DIR = ${srcdir}/../getopt -GETOPT_DEP = $$(GETOPT_DIR) +# Where is the "-liberty" library, containing getopt and obstack? +LIBIBERTY = ${srcdir}/../libiberty/libiberty.a # Flags that describe where you can find the termcap library. # You may need to make other arrangements for USG. @@ -101,11 +94,13 @@ TERMCAP = -ltermcap # {X,T}M_CLIBS, if defined, has system-dependent libs # For example, -lPW for System V to get alloca(). # FIXME STOPGAP FOR BFD LIBRARY: BFD stuff -CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}/libbfd.a -CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a +CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}/libbfd.a \ + ${LIBIBERTY} +CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a \ + ${LIBIBERTY} -ADD_FILES = ${OBSTACK} ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${GETOPT} -ADD_DEPS = ${OBSTACK} ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${GETOPT} +ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} +ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} VERSION = 3.94.3 DIST=gdb-$(VERSION) @@ -178,11 +173,9 @@ REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \ ansidecl.h stdlib.h gmalloc.h stddef.h -GETOPTSRC = $(GETOPT_DIR)/getopt.c $(GETOPT_DIR)/getopt1.c -POSSLIBS_MAINDIR = obstack.h obstack.c regex.c regex.h alloca.c \ - $(MALLOCSRC) -POSSLIBS = $(POSSLIBS_MAINDIR) $(GETOPTSRC) +POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC) +POSSLIBS = $(POSSLIBS_MAINDIR) TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c @@ -247,13 +240,12 @@ gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \ ${RL_LIB} $(CLIBS) -saber_gdb: $(SFILES) $(GETOPTSRC) $(DEPFILES) copying.c obstack.c version.c +saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #setopt load_flags $(CFLAGS) -I$(BFD_DIR) #load ./init.c $(SFILES) #unload ${srcdir}/expread.y #load ${srcdir}/expread.tab.c readline/libreadline.a #load copying.c version.c - #load obstack.c $(GETOPTSRC) #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` #load ${BFD_DIR}/libbfd.a -ltermcap ##void mcheck(a) void (*a)(); { } @@ -350,7 +342,6 @@ depend: $(SOURCES) Makefile.dist -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \ -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \ -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \ - -e 's; [a-z0-9./]*getopt/; $(GETOPT_DEP)/;g' \ -e 's; \./; $${srcdir}/;g' \ >depend $(MAKE_MAKEFILE) @@ -454,12 +445,6 @@ mipsread.o: ${srcdir}/mipsread.c # Drag in the files that are in another directory. -getopt1.o: $(GETOPT_DIR)/getopt1.c - ${CC} -c ${CFLAGS} $(GETOPT_DIR)/getopt1.c - -getopt.o: $(GETOPT_DIR)/getopt.c - ${CC} -c ${CFLAGS} $(GETOPT_DIR)/getopt.c - xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c diff --git a/gdb/coffread.c b/gdb/coffread.c index 3dcb2d1026b..0472591cca8 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -26,13 +26,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symtab.h" #include "breakpoint.h" #include "bfd.h" -#include "libcoff.h" /* FIXME secret internal data from BFD */ #include "symfile.h" #include #include #include +#include "libcoff.h" /* FIXME secret internal data from BFD */ + static void add_symbol_to_list (); static void read_coff_symtab (); static void patch_opaque_types (); @@ -201,6 +202,9 @@ extern CORE_ADDR startup_file_end; /* From blockframe.c */ struct complaint ef_complaint = {"Unmatched .ef symbol(s) ignored starting at symnum %d", 0, 0}; +struct complaint lineno_complaint = + {"Line number pointer %d lower than start of line numbers", 0, 0}; + /* Look up a coff type-number index. Return the address of the slot where the type for that index is stored. @@ -1315,8 +1319,10 @@ enter_linenos (file_offset, first_line, last_line) if (file_offset < linetab_offset) { - fprintf (stderr, "\nInvalid symbol file: file_offset < linetab_offset."); - return; + complain (lineno_complaint, file_offset); + if (file_offset > linetab_size) /* Too big to be an offset? */ + return; + file_offset += linetab_offset; /* Try reading at that linetab offset */ } rawptr = &linetab[file_offset - linetab_offset]; @@ -1327,7 +1333,7 @@ enter_linenos (file_offset, first_line, last_line) first_line--; /* Bcopy since occaisionally rawptr isn't pointing at long - boundaries. FIXME we need to byteswap here!!! */ + boundaries. */ for (bcopy (rawptr, &lptr, LINESZ); L_LNNO32 (&lptr) && L_LNNO32 (&lptr) <= last_line; rawptr += LINESZ, bcopy (rawptr, &lptr, LINESZ)) diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 176065627c8..5abe56e36a5 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1404,7 +1404,7 @@ dbx_symfile_init (sf) info->text_sect = bfd_get_section_by_name (sym_bfd, ".text"); if (!info->text_sect) abort(); - info->symcount = bfd_get_symcount_upper_bound(sym_bfd); /* It's exact for a.out */ + info->symcount = bfd_get_symcount (sym_bfd); /* Read the string table size and check it for bogosity. */ val = lseek (desc, STRING_TABLE_OFFSET, L_SET); @@ -2334,7 +2334,8 @@ read_dbx_symtab (symfile_name, addr, } /* If there's stuff to be cleaned up, clean it up. */ - if (entry_point < bufp->n_value + if (nlistlen > 0 /* We have some syms */ + && entry_point < bufp->n_value && entry_point >= last_o_file_start) { startup_file_start = last_o_file_start; diff --git a/gdb/depend b/gdb/depend index c78aa667e2f..98110b340ac 100755 --- a/gdb/depend +++ b/gdb/depend @@ -1,66 +1,77 @@ altos-xdep.o : altos-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h am29k-pinsn.o : am29k-pinsn.c defs.h target.h am29k-opcode.h -am29k-tdep.o : am29k-tdep.c defs.h gdbcore.h $(INCLUDE_DIR)/bfd.h frame.h \ - param.h tm.h config.status param-no-tm.h xm.h config.status value.h symtab.h inferior.h breakpoint.h +am29k-tdep.o : am29k-tdep.c defs.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h $(INCLUDE_DIR)/obstack.h frame.h param.h tm.h config.status \ + param-no-tm.h xm.h config.status value.h symtab.h inferior.h breakpoint.h arm-pinsn.o : arm-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ arm-opcode.h arm-tdep.o : arm-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h arm-opcode.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h arm-xdep.o : arm-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h arm-opcode.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h blockframe.o : blockframe.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h value.h target.h + frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h value.h \ + target.h breakpoint.o : breakpoint.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ frame.h breakpoint.h value.h expression.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ - gdbcmd.h command.h inferior.h target.h + $(INCLUDE_DIR)/ansidecl.h gdbcmd.h command.h inferior.h target.h coffread.o : coffread.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - breakpoint.h value.h $(INCLUDE_DIR)/bfd.h $(BFD_DIR)/libcoff.h symfile.h + breakpoint.h value.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h symfile.h \ + $(BFD_DIR)/libcoff.h command.o : command.c defs.h command.h symtab.h value.h convex-pinsn.o : convex-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - symtab.h convex-opcode.h + symtab.h convx-opcode.h convex-tdep.o : convex-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ command.h symtab.h value.h frame.h inferior.h breakpoint.h \ - $(INCLUDE_DIR)/wait.h gdbcore.h $(INCLUDE_DIR)/bfd.h gdbcmd.h + $(INCLUDE_DIR)/wait.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h \ + gdbcmd.h convex-xdep.o : convex-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ command.h symtab.h value.h frame.h inferior.h breakpoint.h \ - $(INCLUDE_DIR)/wait.h gdbcore.h $(INCLUDE_DIR)/bfd.h gdbcmd.h + $(INCLUDE_DIR)/wait.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h \ + gdbcmd.h core.o : core.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h inferior.h \ - breakpoint.h value.h symtab.h command.h $(INCLUDE_DIR)/bfd.h target.h \ - gdbcore.h + breakpoint.h value.h symtab.h command.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h target.h gdbcore.h coredep.o : coredep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h $(INCLUDE_DIR)/obstack.h cplus-dem.o : cplus-dem.c dbxread.o : dbxread.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - $(INCLUDE_DIR)/a.out.gnu.h $(INCLUDE_DIR)/target.h $(INCLUDE_DIR)/reloc.h \ - $(INCLUDE_DIR)/stab.gnu.h $(INCLUDE_DIR)/stab.def symtab.h breakpoint.h value.h \ - command.h target.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(BFD_DIR)/liba.out.h \ + $(INCLUDE_DIR)/a.out.gnu.h $(INCLUDE_DIR)/reloc.h $(INCLUDE_DIR)/stab.gnu.h \ + $(INCLUDE_DIR)/stab.def symtab.h breakpoint.h value.h command.h target.h \ + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h $(BFD_DIR)/liba.out.h \ symfile.h environ.o : environ.c environ.h eval.o : eval.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h value.h \ expression.h target.h exec.o : exec.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h inferior.h \ - breakpoint.h value.h symtab.h target.h gdbcore.h $(INCLUDE_DIR)/bfd.h + breakpoint.h value.h symtab.h target.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h expprint.o : expprint.c defs.h symtab.h param.h tm.h config.status param-no-tm.h xm.h config.status \ expression.h value.h findvar.o : findvar.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - frame.h value.h gdbcore.h $(INCLUDE_DIR)/bfd.h inferior.h breakpoint.h \ - target.h -gould-pinsn.o : gould-pinsn.c gdbcore.h $(INCLUDE_DIR)/bfd.h defs.h param.h \ - tm.h config.status param-no-tm.h xm.h config.status symtab.h frame.h np1-opcode.h + frame.h value.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h \ + inferior.h breakpoint.h target.h +gould-pinsn.o : gould-pinsn.c gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h $(INCLUDE_DIR)/obstack.h defs.h param.h tm.h config.status \ + param-no-tm.h xm.h config.status symtab.h frame.h np1-opcode.h gould-xdep.o : gould-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h -hp300hpux-xdep.o : hp300hpux-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h +hp300ux-xdep.o : hp300ux-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ frame.h inferior.h breakpoint.h value.h symtab.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h -i386-pinsn.o : i386-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - frame.h inferior.h breakpoint.h value.h gdbcore.h $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h +i386-pinsn.o : i386-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h $(INCLUDE_DIR)/obstack.h i386-tdep.o : i386-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h i386-xdep.o : i386-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h i960-pinsn.o : i960-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h i960-tdep.o : i960-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ @@ -69,21 +80,22 @@ ieee-float.o : ieee-float.c defs.h param.h tm.h config.status param-no-tm.h xm.h ieee-float.h infcmd.o : infcmd.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h frame.h \ inferior.h breakpoint.h value.h environ.h gdbcmd.h command.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h target.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h target.h inflow.o : inflow.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h command.h signals.h terminal.h \ target.h infptrace.o : infptrace.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h target.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h infrun.o : infrun.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h frame.h \ inferior.h breakpoint.h value.h $(INCLUDE_DIR)/wait.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h signame.h command.h terminal.h target.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h signame.h command.h terminal.h \ + target.h inftarg.o : inftarg.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h target.h $(INCLUDE_DIR)/wait.h \ - gdbcore.h $(INCLUDE_DIR)/bfd.h ieee-float.h + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h ieee-float.h m68k-pinsn.o : m68k-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - m68k-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h + m68k-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h m68k-tdep.o : m68k-tdep.c defs.h ieee-float.h main.o : main.c defs.h gdbcmd.h command.h param.h tm.h config.status param-no-tm.h xm.h config.status \ symtab.h inferior.h breakpoint.h value.h frame.h signals.h target.h @@ -92,11 +104,13 @@ mips-pinsn.o : mips-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h mips-opcode.h mips-tdep.o : mips-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h gdbcmd.h command.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h mips-xdep.o : mips-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h -mipsread.o : mipsread.c param.h tm.h config.status param-no-tm.h xm.h config.status obstack.h defs.h \ - symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h symfile.h $(INCLUDE_DIR)/intel-coff.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h +mipsread.o : mipsread.c param.h defs.h tm.h config.status param-no-tm.h xm.h config.status \ + $(INCLUDE_DIR)/obstack.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h symfile.h $(INCLUDE_DIR)/intel-coff.h news-xdep.o : news-xdep.c Onindy.o : ${srcdir}/nindy-share/Onindy.c ${srcdir}/nindy-share/ttycntl.h \ ${srcdir}/nindy-share/block_io.h $(INCLUDE_DIR)/wait.h ${srcdir}/nindy-share/env.h \ @@ -108,83 +122,92 @@ ttyflush.o : ${srcdir}/nindy-share/ttyflush.c ${srcdir}/nindy-share/ttycntl.h nindy-tdep.o : nindy-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ frame.h ns32k-pinsn.o : ns32k-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - symtab.h ns32k-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h + symtab.h ns32k-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h printcmd.o : printcmd.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - symtab.h value.h expression.h gdbcore.h $(INCLUDE_DIR)/bfd.h gdbcmd.h \ - command.h target.h + symtab.h value.h expression.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h gdbcmd.h command.h target.h pyr-pinsn.o : pyr-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - pyr-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h + pyr-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h pyr-tdep.o : pyr-tdep.c pyr-xdep.o : pyr-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h remote-eb.o : remote-eb.c defs.h tm-29k.h param-no-tm.h xm.h config.status inferior.h \ breakpoint.h value.h symtab.h frame.h param.h $(INCLUDE_DIR)/wait.h \ terminal.h target.h remote-nindy.o : remote-nindy.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ frame.h inferior.h breakpoint.h value.h symtab.h target.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h command.h ieee-float.h $(INCLUDE_DIR)/wait.h \ - ${srcdir}/nindy-share/ttycntl.h ${srcdir}/nindy-share/demux.h ${srcdir}/nindy-share/env.h \ - ${srcdir}/nindy-share/stop.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h command.h ieee-float.h \ + $(INCLUDE_DIR)/wait.h ${srcdir}/nindy-share/ttycntl.h ${srcdir}/nindy-share/demux.h \ + ${srcdir}/nindy-share/env.h ${srcdir}/nindy-share/stop.h remote-vx.o : remote-vx.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h $(INCLUDE_DIR)/wait.h target.h \ - gdbcore.h $(INCLUDE_DIR)/bfd.h command.h symfile.h ${srcdir}/vx-share/xdr_ptrace.h \ - ${srcdir}/vx-share/xdr_regs.h ${srcdir}/vx-share/reg.h ${srcdir}/vx-share/xdr_ld.h \ - ${srcdir}/vx-share/xdr_rdb.h ${srcdir}/vx-share/dbgRpcLib.h + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h command.h symfile.h \ + ${srcdir}/vx-share/xdr_ptrace.h ${srcdir}/vx-share/xdr_regs.h ${srcdir}/vx-share/reg.h \ + ${srcdir}/vx-share/xdr_ld.h ${srcdir}/vx-share/xdr_rdb.h ${srcdir}/vx-share/dbgRpcLib.h remote.o : remote.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ inferior.h breakpoint.h value.h symtab.h target.h $(INCLUDE_DIR)/wait.h \ terminal.h signame.o : signame.c signame.h solib.o : solib.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h command.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h command.h target.h frame.h source.o : source.c defs.h symtab.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - command.h frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h + command.h gdbcmd.h frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h sparc-pinsn.o : sparc-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - symtab.h sparc-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h /usr/include/string.h \ - target.h + symtab.h sparc-opcode.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h /usr/include/string.h target.h sparc-tdep.o : sparc-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h obstack.h signame.h target.h \ - ieee-float.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h signame.h target.h ieee-float.h \ + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h sparc-xdep.o : sparc-xdep.c defs.h tm-sparc.h param-no-tm.h xm.h config.status inferior.h \ breakpoint.h value.h symtab.h frame.h param.h target.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h stack.o : stack.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h frame.h \ - gdbcmd.h command.h value.h gdbcore.h $(INCLUDE_DIR)/bfd.h target.h \ - breakpoint.h + gdbcmd.h command.h value.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h target.h breakpoint.h sun3-xdep.o : sun3-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status inferior.h \ - breakpoint.h value.h symtab.h frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h + breakpoint.h value.h symtab.h frame.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h sun386-xdep.o : sun386-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ frame.h inferior.h breakpoint.h value.h symtab.h signame.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h symfile.o : symfile.c defs.h symtab.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - gdbcore.h $(INCLUDE_DIR)/bfd.h frame.h target.h value.h symfile.h gdbcmd.h \ - command.h breakpoint.h -symmetry-tdep.o : symmetry-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - frame.h inferior.h breakpoint.h value.h symtab.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h -symmetry-xdep.o : symmetry-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - frame.h inferior.h breakpoint.h value.h symtab.h gdbcore.h \ - $(INCLUDE_DIR)/bfd.h + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h frame.h target.h \ + value.h symfile.h gdbcmd.h command.h breakpoint.h +symm-tdep.o : symm-tdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h +symm-xdep.o : symm-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h symmisc.o : symmisc.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ breakpoint.h value.h command.h symtab.o : symtab.c defs.h symtab.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - gdbcore.h $(INCLUDE_DIR)/bfd.h frame.h target.h value.h symfile.h gdbcmd.h \ - command.h + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h frame.h target.h \ + value.h symfile.h gdbcmd.h command.h target.o : target.c defs.h target.h gdbcmd.h command.h symtab.h inferior.h \ breakpoint.h value.h frame.h param.h tm.h config.status param-no-tm.h xm.h config.status \ - $(INCLUDE_DIR)/bfd.h symfile.h + $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h symfile.h tdesc.o : tdesc.c umax-xdep.o : umax-xdep.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status frame.h \ - inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h + inferior.h breakpoint.h value.h symtab.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h utils.o : utils.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status signals.h gdbcmd.h \ - command.h terminal.h $(INCLUDE_DIR)/bfd.h target.h + command.h terminal.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h \ + $(INCLUDE_DIR)/obstack.h target.h valarith.o : valarith.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status value.h \ symtab.h expression.h target.h valops.o : valops.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h value.h \ - frame.h inferior.h breakpoint.h gdbcore.h $(INCLUDE_DIR)/bfd.h target.h + frame.h inferior.h breakpoint.h gdbcore.h $(INCLUDE_DIR)/bfd.h \ + $(INCLUDE_DIR)/ansidecl.h target.h valprint.o : valprint.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ - value.h gdbcore.h $(INCLUDE_DIR)/bfd.h gdbcmd.h command.h target.h obstack.h + value.h gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h gdbcmd.h \ + command.h target.h values.o : values.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h value.h \ - gdbcore.h $(INCLUDE_DIR)/bfd.h frame.h command.h + gdbcore.h $(INCLUDE_DIR)/bfd.h $(INCLUDE_DIR)/ansidecl.h frame.h command.h \ + gdbcmd.h vax-pinsn.o : vax-pinsn.c defs.h param.h tm.h config.status param-no-tm.h xm.h config.status symtab.h \ vax-opcode.h xdr_ld.o : ${srcdir}/vx-share/xdr_ld.c ${srcdir}/vx-share/vxWorks.h ${srcdir}/vx-share/vxTypes.h \ diff --git a/gdb/environ.c b/gdb/environ.c index 4109472e4ea..45767e50536 100644 --- a/gdb/environ.c +++ b/gdb/environ.c @@ -157,6 +157,7 @@ set_in_environ (e, var, value) if (!strcmp(var, "PATH") /* Object file location */ || !strcmp (var, "G960BASE") /* Intel 960 downloads */ || !strcmp (var, "G960BIN") /* Intel 960 downloads */ + || !strcmp (var, "GNUTARGET") /* BFD object file type */ ) { putenv (strsave (s)); } -- 2.30.2