aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-05-04 23:15:02 +0000
committerJohn Gilmore <gnu@cygnus>1991-05-04 23:15:02 +0000
commit5594d534a24ff0e48806803376209d4b27ec8351 (patch)
tree27b7836ec8a38f69e68e3c864df90f364208160a
parentb1847ba9e7da744bb3695f9611dad4119cc7991e (diff)
downloadgdb-5594d534a24ff0e48806803376209d4b27ec8351.zip
gdb-5594d534a24ff0e48806803376209d4b27ec8351.tar.gz
gdb-5594d534a24ff0e48806803376209d4b27ec8351.tar.bz2
Saber C (lint) cleanups, and a few bug fixes. See ChangeLog.
-rw-r--r--gdb/ChangeLog12
-rwxr-xr-xgdb/Makefile19
-rwxr-xr-xgdb/Makefile.dist13
-rw-r--r--gdb/Makefile.in13
-rw-r--r--gdb/alldeps.mak5
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/core.c11
-rw-r--r--gdb/infptrace.c5
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/saber.suppress40
-rw-r--r--gdb/symtab.c6
11 files changed, 90 insertions, 39 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 35cad84..666f0c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+Sat May 4 11:11:07 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * Makefile.dist: Roll VERSION to 3.95.
+ Fix up "saber_gdb" to work again.
+ * saber.suppress: Update.
+
+ * coffread.c, exec.c, infptrace.c, inftarg.c, remote.c, solib.c,
+ symtab.h, target.c, target.h: Lint.
+ * core.c: setup and select frame after reading shared libs,
+ else reading shared libs will clobber them. Lint.
+ * utils.c (error): Force out any buffered wrap text.
+
Fri May 3 22:01:56 1991 John Gilmore (gnu at cygint.cygnus.com)
* remote.c: Remove decls of memory_insert_breakpoint
diff --git a/gdb/Makefile b/gdb/Makefile
index 7446c68..504e1b5 100755
--- a/gdb/Makefile
+++ b/gdb/Makefile
@@ -49,6 +49,9 @@ i960-tdep.c\
infptrace.c\
m68k-pinsn.c\
m68k-tdep.c\
+m88k-pinsn.c\
+m88k-tdep.c\
+m88k-xdep.c\
mips-pinsn.c\
mips-tdep.c\
mips-xdep.c\
@@ -164,6 +167,7 @@ ALLCONFIG=\
./tconfig/isi\
./tconfig/littlemips\
./tconfig/m88k\
+./tconfig/m88k.orig\
./tconfig/merlin\
./tconfig/news\
./tconfig/news1000\
@@ -202,6 +206,7 @@ ALLCONFIG=\
./xconfig/isi\
./xconfig/littlemips\
./xconfig/m88k\
+./xconfig/m88k.orig\
./xconfig/merlin\
./xconfig/news\
./xconfig/news1000\
@@ -285,7 +290,8 @@ MALLOC_CFLAGS =
INCLUDE_DIR = ${srcdir}/../include
INCLUDE_DEP = $$(INCLUDE_DIR)
-# Where is the BFD library? Traditionally ../bfd or ./bfd
+# Where is the source dir for the BFD library? Traditionally ../bfd or ./bfd
+# (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
BFD_DIR = ${srcdir}/../bfd
BFD_DEP = $$(BFD_DIR)
@@ -305,7 +311,7 @@ CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
LDFLAGS = $(CFLAGS)
# Where is the "-liberty" library, containing getopt and obstack?
-LIBIBERTY = ${srcdir}/../libiberty/libiberty.a
+LIBIBERTY = ${srcdir}/../libiberty${subdir}/libiberty.a
# Flags that describe where you can find the termcap library.
# You may need to make other arrangements for USG.
@@ -318,7 +324,7 @@ 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 \
+CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}${subdir}/libbfd.a \
${LIBIBERTY}
CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a \
${LIBIBERTY}
@@ -326,7 +332,7 @@ CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a \
ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC}
ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC}
-VERSION = 3.94.3
+VERSION = 3.95
DIST=gdb-$(VERSION)
LINT=/usr/5bin/lint
@@ -471,8 +477,11 @@ saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
#load ${srcdir}/expread.tab.c readline/libreadline.a
#load copying.c version.c
#load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
- #load ${BFD_DIR}/libbfd.a -ltermcap
+ #load ${LIBIBERTY}/*.c
+ #load ${BFD_DIR}/*.c
+ #load -ltermcap
##void mcheck(a) void (*a)(); { }
+ ##void mtrace(a) void (*a)(); { }
diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist
index 3acd909..b3f9989 100755
--- a/gdb/Makefile.dist
+++ b/gdb/Makefile.dist
@@ -82,7 +82,8 @@ CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
LDFLAGS = $(CFLAGS)
# Where is the "-liberty" library, containing getopt and obstack?
-LIBIBERTY = ${srcdir}/../libiberty${subdir}/libiberty.a
+LIBIBERTY_DIR = ${srcdir}/../libiberty
+LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a
# Flags that describe where you can find the termcap library.
# You may need to make other arrangements for USG.
@@ -242,14 +243,18 @@ gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o
${RL_LIB} $(CLIBS)
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
- #setopt load_flags $(CFLAGS) -I$(BFD_DIR)
+ #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
#load ./init.c $(SFILES)
- #unload ${srcdir}/expread.y
+ #unload ${srcdir}/expread.y ${srcdir}/vx-share/*.h
+ #unload ${srcdir}/nindy-share/[A-Z]*
#load ${srcdir}/expread.tab.c readline/libreadline.a
#load copying.c version.c
#load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
- #load ${BFD_DIR}/libbfd.a -ltermcap
+ #load ${LIBIBERTY_DIR}/*.c
+ #load ${BFD_DIR}/*.c
+ #load -ltermcap
##void mcheck(a) void (*a)(); { }
+ ##void mtrace() { }
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3acd909..b3f9989 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -82,7 +82,8 @@ CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
LDFLAGS = $(CFLAGS)
# Where is the "-liberty" library, containing getopt and obstack?
-LIBIBERTY = ${srcdir}/../libiberty${subdir}/libiberty.a
+LIBIBERTY_DIR = ${srcdir}/../libiberty
+LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a
# Flags that describe where you can find the termcap library.
# You may need to make other arrangements for USG.
@@ -242,14 +243,18 @@ gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o
${RL_LIB} $(CLIBS)
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
- #setopt load_flags $(CFLAGS) -I$(BFD_DIR)
+ #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
#load ./init.c $(SFILES)
- #unload ${srcdir}/expread.y
+ #unload ${srcdir}/expread.y ${srcdir}/vx-share/*.h
+ #unload ${srcdir}/nindy-share/[A-Z]*
#load ${srcdir}/expread.tab.c readline/libreadline.a
#load copying.c version.c
#load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
- #load ${BFD_DIR}/libbfd.a -ltermcap
+ #load ${LIBIBERTY_DIR}/*.c
+ #load ${BFD_DIR}/*.c
+ #load -ltermcap
##void mcheck(a) void (*a)(); { }
+ ##void mtrace() { }
diff --git a/gdb/alldeps.mak b/gdb/alldeps.mak
index 32c2859..50da245 100644
--- a/gdb/alldeps.mak
+++ b/gdb/alldeps.mak
@@ -23,6 +23,9 @@ i960-tdep.c\
infptrace.c\
m68k-pinsn.c\
m68k-tdep.c\
+m88k-pinsn.c\
+m88k-tdep.c\
+m88k-xdep.c\
mips-pinsn.c\
mips-tdep.c\
mips-xdep.c\
@@ -138,6 +141,7 @@ ALLCONFIG=\
./tconfig/isi\
./tconfig/littlemips\
./tconfig/m88k\
+./tconfig/m88k.orig\
./tconfig/merlin\
./tconfig/news\
./tconfig/news1000\
@@ -176,6 +180,7 @@ ALLCONFIG=\
./xconfig/isi\
./xconfig/littlemips\
./xconfig/m88k\
+./xconfig/m88k.orig\
./xconfig/merlin\
./xconfig/news\
./xconfig/news1000\
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 7ebd3657..4601e2d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1358,7 +1358,7 @@ enter_linenos (file_offset, first_line, last_line)
if (file_offset < linetab_offset)
{
- complain (lineno_complaint, file_offset);
+ 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 */
diff --git a/gdb/core.c b/gdb/core.c
index 2b506a7..3d9ab80 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -142,12 +142,14 @@ core_open (filename, from_tty)
if (ontop) {
/* Fetch all registers from core file */
target_fetch_registers (-1);
- set_current_frame ( create_new_frame (read_register (FP_REGNUM),
- read_pc ()));
- select_frame (get_current_frame (), 0);
+ /* Add symbols for any shared libraries that were in use */
#ifdef SOLIB_ADD
SOLIB_ADD (NULL, from_tty);
#endif
+ /* Now, set up the frame cache, and print the top of stack */
+ set_current_frame ( create_new_frame (read_register (FP_REGNUM),
+ read_pc ()));
+ select_frame (get_current_frame (), 0);
print_sel_frame (0); /* Print the top frame and source line */
} else {
printf (
@@ -393,7 +395,7 @@ core_xfer_memory (memaddr, myaddr, len, write)
/* We just get all the registers, so we don't use regno. */
/* ARGSUSED */
-static int
+static void
get_core_registers (regno)
int regno;
{
@@ -432,7 +434,6 @@ get_core_registers (regno)
}
}
registers_fetched();
- return 0; /* FIXME, what result goes here? */
}
struct target_ops core_ops = {
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index a5b976d..2298c98 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -234,10 +234,9 @@ fetch_register (regno)
supply_register (regno, buf);
}
-/* Fetch all registers, or just one, from the child process.
- We should check for errors, but we don't. FIXME. */
+/* Fetch all registers, or just one, from the child process. */
-int
+void
fetch_inferior_registers (regno)
int regno;
{
diff --git a/gdb/remote.c b/gdb/remote.c
index 6a2dd7c..8215243 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -299,7 +299,7 @@ remote_wait (status)
/* Currently we just read all the registers, so we don't use regno. */
/* ARGSUSED */
-int
+void
remote_fetch_registers (regno)
int regno;
{
@@ -325,7 +325,6 @@ remote_fetch_registers (regno)
}
for (i = 0; i < NUM_REGS; i++)
supply_register (i, &regs[REGISTER_BYTE(i)]);
- return 0;
}
/* Prepare to store registers. Since we send them all, we have to
diff --git a/gdb/saber.suppress b/gdb/saber.suppress
index 19fac4d..959dec9 100644
--- a/gdb/saber.suppress
+++ b/gdb/saber.suppress
@@ -246,20 +246,8 @@ suppress 529 in do_registers_info
/* Statement not reached */
suppress 529 in value_from_register
/* Statement not reached */
-suppress 530 "../environ.c":69
-/* Empty body of statement */
-suppress 530 "../remote-eb.c":333
-/* Empty body of statement */
-suppress 530 "../remote-eb.c":331
-/* Empty body of statement */
-suppress 530 "../remote-eb.c":324
-/* Empty body of statement */
-suppress 530 "../dbxread.c":792
-/* Empty body of statement */
suppress 530
/* Empty body of statement */
-suppress 530 "../dbxread.c":796
-/* Empty body of statement */
suppress 546 in net_quit
/* Function exits through bottom */
suppress 546 in net_wait
@@ -370,10 +358,36 @@ suppress 594 in bpstat_stop_status
/* Set but not used */
suppress 595 in coffstrip
/* Used before set */
-suppress 652 ../bfd.h
+suppress 652 ../include/bfd.h
/* Declaration has no effect */
suppress 652 /usr/include/machine/reg.h
/* Declaration has no effect */
+suppress 652 /usr/include/sun4/reg.h
+/* Declaration has no effect */
+suppress 68 on complain
+/* Benign type mismatch */
+suppress 3 in read_range_type
+/* Over/underflow unary minus */
+suppress 594 ../expread.tab.c
+/* Set but not used */
+suppress 593 ../expread.tab.c
+/* Label not used */
+suppress 590 ../expread.tab.c
+/* Formal param not used */
+suppress 442 ../../bfd/archive.c
+/* \0 in string */
+suppress 558 ../../bfd/b.out.c
+/* Conditional if always true */
+suppress 558 ../../bfd/coffswap.c
+/* Conditional if always true -- bfd_h_put_x */
+suppress 529 ../../bfd/coffswap.c
+/* Stmt unreach -- bfd_h_put_x */
+suppress 590 ../../bfd/ecoff.c
+/* Formal parameter not used */
+suppress 590 on ignore
+/* Formal param not used */
+suppress 590 on ignore_newsect
+/* Formal param not used */
/* Signals caught and ignored */
catch HUP
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 7427300..6ebea5e 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -27,6 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "value.h"
#include "symfile.h"
#include "gdbcmd.h"
+#include "regex.h"
#include <obstack.h>
#include <assert.h>
@@ -229,8 +230,9 @@ check_stub_type(type)
complain (&stub_noname_complaint, 0);
return;
}
- if (sym = lookup_symbol (name, 0, STRUCT_NAMESPACE, 0,
- (struct symtab **)NULL) )
+ sym = lookup_symbol (name, 0, STRUCT_NAMESPACE, 0,
+ (struct symtab **)NULL);
+ if (sym)
bcopy (SYMBOL_TYPE(sym), type, sizeof (struct type));
}
}