* Makefile.in (VERSION): Bump to 4.6.3.
* dwarfread.c (scan_partial_symbols): Skip over DIE's within function scopes when building partial symbol tables. * objfiles.c (open_existing_mapped_file): Make it clear in warning message that out of date mapped files are ignored. * symtab.c (lookup_symtab_1, lookup_symbol): Print compilation unit source file name in error message.
This commit is contained in:
parent
bec66218fc
commit
a679650f37
|
@ -1,3 +1,13 @@
|
||||||
|
Mon Aug 10 22:27:19 1992 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in (VERSION): Bump to 4.6.3.
|
||||||
|
* dwarfread.c (scan_partial_symbols): Skip over DIE's within
|
||||||
|
function scopes when building partial symbol tables.
|
||||||
|
* objfiles.c (open_existing_mapped_file): Make it clear in
|
||||||
|
warning message that out of date mapped files are ignored.
|
||||||
|
* symtab.c (lookup_symtab_1, lookup_symbol): Print compilation
|
||||||
|
unit source file name in error message.
|
||||||
|
|
||||||
Sat Aug 8 23:12:22 1992 Fred Fish (fnf@cygnus.com)
|
Sat Aug 8 23:12:22 1992 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
* dwarfread.c (struct dieinfo): Add has_at_byte_size.
|
* dwarfread.c (struct dieinfo): Add has_at_byte_size.
|
||||||
|
|
|
@ -126,7 +126,7 @@ RL_LIB = ./../readline${subdir}/libreadline.a
|
||||||
# All the includes used for CFLAGS and for lint.
|
# All the includes used for CFLAGS and for lint.
|
||||||
# -I. for config files.
|
# -I. for config files.
|
||||||
# -I${srcdir} possibly for regex.h also.
|
# -I${srcdir} possibly for regex.h also.
|
||||||
INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR)
|
INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR)
|
||||||
|
|
||||||
# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
|
# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
|
||||||
# from the config/ directory.
|
# from the config/ directory.
|
||||||
|
@ -162,7 +162,7 @@ CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \
|
||||||
ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
|
ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
|
||||||
ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
|
ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
|
||||||
|
|
||||||
VERSION = 4.6.1
|
VERSION = 4.6.3
|
||||||
DIST=gdb
|
DIST=gdb
|
||||||
|
|
||||||
LINT=/usr/5bin/lint
|
LINT=/usr/5bin/lint
|
||||||
|
@ -188,7 +188,7 @@ SFILES_MAINDIR = \
|
||||||
remote.c source.c stack.c symmisc.c symtab.c symfile.c \
|
remote.c source.c stack.c symmisc.c symtab.c symfile.c \
|
||||||
utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
|
utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
|
||||||
${DEMANGLER}.c mem-break.c target.c inftarg.c \
|
${DEMANGLER}.c mem-break.c target.c inftarg.c \
|
||||||
dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
|
dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
|
||||||
ieee-float.c language.c parse.c buildsym.c objfiles.c \
|
ieee-float.c language.c parse.c buildsym.c objfiles.c \
|
||||||
minsyms.c mipsread.c maint.c
|
minsyms.c mipsread.c maint.c
|
||||||
|
|
||||||
|
@ -277,7 +277,8 @@ OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
|
||||||
copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \
|
copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \
|
||||||
inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
|
inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
|
||||||
buildsym.o objfiles.o minsyms.o maint.o demangle.o \
|
buildsym.o objfiles.o minsyms.o maint.o demangle.o \
|
||||||
dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o
|
dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
|
||||||
|
stabsread.o
|
||||||
|
|
||||||
RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
|
RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
|
||||||
|
|
||||||
|
@ -644,6 +645,10 @@ m2-exp.tab.c: $(srcdir)/m2-exp.y
|
||||||
< y.tab.c > m2-exp.tab.c
|
< y.tab.c > m2-exp.tab.c
|
||||||
-rm y.tab.c
|
-rm y.tab.c
|
||||||
|
|
||||||
|
|
||||||
|
main.o: ${srcdir}/main.c
|
||||||
|
${CC} -c ${INTERNAL_CFLAGS} -I${READLINE_DIR} $<
|
||||||
|
|
||||||
# The symbol-file readers have dependencies on BFD header files.
|
# The symbol-file readers have dependencies on BFD header files.
|
||||||
dbxread.o: ${srcdir}/dbxread.c
|
dbxread.o: ${srcdir}/dbxread.c
|
||||||
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
|
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
|
||||||
|
@ -660,6 +665,9 @@ elfread.o: ${srcdir}/elfread.c
|
||||||
dwarfread.o: ${srcdir}/dwarfread.c
|
dwarfread.o: ${srcdir}/dwarfread.c
|
||||||
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
|
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
|
||||||
|
|
||||||
|
stabsread.o: ${srcdir}/stabsread.c
|
||||||
|
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/stabsread.c
|
||||||
|
|
||||||
xcoffread.o: ${srcdir}/xcoffread.c
|
xcoffread.o: ${srcdir}/xcoffread.c
|
||||||
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
|
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
|
||||||
|
|
||||||
|
|
|
@ -2382,15 +2382,50 @@ DESCRIPTION
|
||||||
|
|
||||||
Process the DIE's within a single compilation unit, looking for
|
Process the DIE's within a single compilation unit, looking for
|
||||||
interesting DIE's that contribute to the partial symbol table entry
|
interesting DIE's that contribute to the partial symbol table entry
|
||||||
for this compilation unit. Since we cannot follow any sibling
|
for this compilation unit.
|
||||||
chains without reading the complete DIE info for every DIE,
|
|
||||||
it is probably faster to just sequentially check each one to
|
|
||||||
see if it is one of the types we are interested in, and if so,
|
|
||||||
then extract all the attributes info and generate a partial
|
|
||||||
symbol table entry.
|
|
||||||
|
|
||||||
NOTES
|
NOTES
|
||||||
|
|
||||||
|
There are some DIE's that may appear both at file scope and within
|
||||||
|
the scope of a function. We are only interested in the ones at file
|
||||||
|
scope, and the only way to tell them apart is to keep track of the
|
||||||
|
scope. For example, consider the test case:
|
||||||
|
|
||||||
|
static int i;
|
||||||
|
main () { int j; }
|
||||||
|
|
||||||
|
for which the relevant DWARF segment has the structure:
|
||||||
|
|
||||||
|
0x51:
|
||||||
|
0x23 global subrtn sibling 0x9b
|
||||||
|
name main
|
||||||
|
fund_type FT_integer
|
||||||
|
low_pc 0x800004cc
|
||||||
|
high_pc 0x800004d4
|
||||||
|
|
||||||
|
0x74:
|
||||||
|
0x23 local var sibling 0x97
|
||||||
|
name j
|
||||||
|
fund_type FT_integer
|
||||||
|
location OP_BASEREG 0xe
|
||||||
|
OP_CONST 0xfffffffc
|
||||||
|
OP_ADD
|
||||||
|
0x97:
|
||||||
|
0x4
|
||||||
|
|
||||||
|
0x9b:
|
||||||
|
0x1d local var sibling 0xb8
|
||||||
|
name i
|
||||||
|
fund_type FT_integer
|
||||||
|
location OP_ADDR 0x800025dc
|
||||||
|
|
||||||
|
0xb8:
|
||||||
|
0x4
|
||||||
|
|
||||||
|
We want to include the symbol 'i' in the partial symbol table, but
|
||||||
|
not the symbol 'j'. In essence, we want to skip all the dies within
|
||||||
|
the scope of a TAG_global_subroutine DIE.
|
||||||
|
|
||||||
Don't attempt to add anonymous structures or unions since they have
|
Don't attempt to add anonymous structures or unions since they have
|
||||||
no name. Anonymous enumerations however are processed, because we
|
no name. Anonymous enumerations however are processed, because we
|
||||||
want to extract their member names (the check for a tag name is
|
want to extract their member names (the check for a tag name is
|
||||||
|
@ -2408,6 +2443,7 @@ scan_partial_symbols (thisdie, enddie, objfile)
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
{
|
{
|
||||||
char *nextdie;
|
char *nextdie;
|
||||||
|
char *temp;
|
||||||
struct dieinfo di;
|
struct dieinfo di;
|
||||||
|
|
||||||
while (thisdie < enddie)
|
while (thisdie < enddie)
|
||||||
|
@ -2426,6 +2462,28 @@ scan_partial_symbols (thisdie, enddie, objfile)
|
||||||
{
|
{
|
||||||
case TAG_global_subroutine:
|
case TAG_global_subroutine:
|
||||||
case TAG_subroutine:
|
case TAG_subroutine:
|
||||||
|
completedieinfo (&di, objfile);
|
||||||
|
if (di.at_name && (di.has_at_low_pc || di.at_location))
|
||||||
|
{
|
||||||
|
add_partial_symbol (&di, objfile);
|
||||||
|
/* If there is a sibling attribute, adjust the nextdie
|
||||||
|
pointer to skip the entire scope of the subroutine.
|
||||||
|
Apply some sanity checking to make sure we don't
|
||||||
|
overrun or underrun the range of remaining DIE's */
|
||||||
|
if (di.at_sibling != 0)
|
||||||
|
{
|
||||||
|
temp = dbbase + di.at_sibling - dbroff;
|
||||||
|
if ((temp < thisdie) || (temp >= enddie))
|
||||||
|
{
|
||||||
|
dwarfwarn ("reference to DIE (0x%x) outside compilation unit", di.at_sibling);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nextdie = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case TAG_global_variable:
|
case TAG_global_variable:
|
||||||
case TAG_local_variable:
|
case TAG_local_variable:
|
||||||
completedieinfo (&di, objfile);
|
completedieinfo (&di, objfile);
|
||||||
|
|
|
@ -435,7 +435,8 @@ open_existing_mapped_file (symsfilename, mtime, mapped)
|
||||||
{
|
{
|
||||||
if (!mapped)
|
if (!mapped)
|
||||||
{
|
{
|
||||||
warning ("mapped symbol file `%s' is out of date", symsfilename);
|
warning ("mapped symbol file `%s' is out of date, ignored it",
|
||||||
|
symsfilename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((fd = open (symsfilename, O_RDWR)) < 0)
|
else if ((fd = open (symsfilename, O_RDWR)) < 0)
|
||||||
|
|
Loading…
Reference in New Issue