Saber C (lint) cleanups, and a few bug fixes. See ChangeLog.

This commit is contained in:
John Gilmore 1991-05-04 23:15:02 +00:00
parent b1847ba9e7
commit 5594d534a2
11 changed files with 90 additions and 39 deletions

View File

@ -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

View File

@ -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)(); { }

View File

@ -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() { }

View File

@ -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() { }

View File

@ -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\

View File

@ -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 */

View File

@ -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 = {

View File

@ -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;
{

View File

@ -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

View File

@ -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

View File

@ -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));
}
}