mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
* dwarf2read.c: New file, DWARF 2 reader originally contributed by
Brent Benson, with additions by Gary Funck and Jerry Kreuscher. * Makefile.in (COMMON_OBS): Add dwarf2read.o. (SFILES): Add dwarf2read.c. (dwarf2read.o): Add build rule. * symfile.h (dwarf2_has_info, dwarf2_build_psymtabs): Declare exported functions. * elfread.c (elf_symfile_read): Call them. (elf_symtab_read) [HARRIS_TARGET]: Skip some special symbols.
This commit is contained in:
parent
540cd16faf
commit
fcf0554956
@ -1,3 +1,15 @@
|
||||
Fri Jul 19 14:05:57 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* dwarf2read.c: New file, DWARF 2 reader originally contributed by
|
||||
Brent Benson, with additions by Gary Funck and Jerry Kreuscher.
|
||||
* Makefile.in (COMMON_OBS): Add dwarf2read.o.
|
||||
(SFILES): Add dwarf2read.c.
|
||||
(dwarf2read.o): Add build rule.
|
||||
* symfile.h (dwarf2_has_info, dwarf2_build_psymtabs): Declare
|
||||
exported functions.
|
||||
* elfread.c (elf_symfile_read): Call them.
|
||||
(elf_symtab_read) [HARRIS_TARGET]: Skip some special symbols.
|
||||
|
||||
Thu Jul 18 01:22:01 1996 Geoffrey Noer <noer@cygnus.com>
|
||||
|
||||
* symfile.c (symfile_bfd_open):
|
||||
|
@ -352,7 +352,8 @@ TARGET_FLAGS_TO_PASS = \
|
||||
SFILES = bcache.c blockframe.c breakpoint.c buildsym.c callback.c c-exp.y \
|
||||
c-lang.c c-typeprint.c c-valprint.c ch-exp.c ch-lang.c \
|
||||
ch-typeprint.c ch-valprint.c coffread.c command.c complaints.c \
|
||||
corefile.c cp-valprint.c dbxread.c demangle.c dwarfread.c \
|
||||
corefile.c cp-valprint.c \
|
||||
dbxread.c demangle.c dwarfread.c dwarf2read.c \
|
||||
elfread.c environ.c eval.c expprint.c \
|
||||
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
|
||||
gdbtypes.c infcmd.c inflow.c infrun.c language.c \
|
||||
@ -361,8 +362,9 @@ SFILES = bcache.c blockframe.c breakpoint.c buildsym.c callback.c c-exp.y \
|
||||
printcmd.c remote.c remote-nrom.c scm-exp.c scm-lang.c scm-valprint.c \
|
||||
source.c stabsread.c stack.c symfile.c symmisc.c \
|
||||
symtab.c target.c thread.c top.c \
|
||||
typeprint.c utils.c valarith.c valops.c \
|
||||
valprint.c values.c serial.c ser-unix.c mdebugread.c os9kread.c
|
||||
typeprint.c utils.c \
|
||||
valarith.c valops.c valprint.c values.c \
|
||||
serial.c ser-unix.c mdebugread.c os9kread.c
|
||||
|
||||
LINTFILES = $(SFILES) $(YYFILES) init.c
|
||||
|
||||
@ -467,7 +469,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
||||
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
|
||||
dbxread.o coffread.o elfread.o \
|
||||
dwarfread.o mipsread.o stabsread.o corefile.o \
|
||||
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
|
||||
c-lang.o ch-exp.o ch-lang.o f-lang.o m2-lang.o \
|
||||
scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
|
||||
c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
|
||||
@ -1109,6 +1111,10 @@ dwarfread.o: dwarfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
|
||||
$(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \
|
||||
$(symtab_h) gdb_string.h
|
||||
|
||||
dwarf2read.o: dwarf2read.c $(bfd_h) buildsym.h $(defs_h) \
|
||||
$(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \
|
||||
$(symtab_h) gdb_string.h
|
||||
|
||||
elfread.o: elfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
|
||||
gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
|
||||
|
||||
|
4402
gdb/dwarf2read.c
Normal file
4402
gdb/dwarf2read.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -407,6 +407,17 @@ elf_symtab_read (abfd, addr, objfile, dynamic)
|
||||
should be harmless (but I encourage people to fix this
|
||||
in the assembler instead of adding checks here). */
|
||||
continue;
|
||||
#ifdef HARRIS_TARGET
|
||||
else if (sym->name[0] == '.' && sym->name[1] == '.')
|
||||
{
|
||||
/* Looks like a Harris compiler generated label for the
|
||||
purpose of marking instructions that are relevant to
|
||||
DWARF dies. The assembler can't get rid of these
|
||||
because they are relocatable addresses that the
|
||||
linker needs to resolve. */
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
ms_type = mst_file_text;
|
||||
@ -592,7 +603,12 @@ elf_symfile_read (objfile, section_offsets, mainline)
|
||||
special ELF sections. We first have to find them... */
|
||||
|
||||
bfd_map_over_sections (abfd, elf_locate_sections, (PTR) &ei);
|
||||
if (ei.dboffset && ei.lnoffset)
|
||||
if (dwarf2_has_info (abfd) && !offset)
|
||||
{
|
||||
/* DWARF 2 sections */
|
||||
dwarf2_build_psymtabs (objfile, section_offsets, mainline);
|
||||
}
|
||||
else if (ei.dboffset && ei.lnoffset)
|
||||
{
|
||||
/* DWARF sections */
|
||||
dwarf_build_psymtabs (objfile,
|
||||
|
@ -205,6 +205,13 @@ extern void
|
||||
dwarf_build_psymtabs PARAMS ((struct objfile *, struct section_offsets *, int,
|
||||
file_ptr, unsigned int, file_ptr, unsigned int));
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
extern int dwarf2_has_info PARAMS ((bfd *abfd));
|
||||
|
||||
extern void dwarf2_build_psymtabs PARAMS ((struct objfile *,
|
||||
struct section_offsets *,
|
||||
int));
|
||||
/* From mdebugread.c */
|
||||
|
||||
/* Hack to force structures to exist before use in parameter list. */
|
||||
|
Loading…
Reference in New Issue
Block a user