aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1996-07-19 21:16:13 +0000
committerStan Shebs <shebs@codesourcery.com>1996-07-19 21:16:13 +0000
commitfcf05549562ba20a3d01f354674e078fee256caa (patch)
treec6246611e9685007748fd5254e57aca65aa1b380 /gdb/elfread.c
parent540cd16faf53c7e514ed617e8dcb17f3b37cff5f (diff)
downloadgdb-fcf05549562ba20a3d01f354674e078fee256caa.zip
gdb-fcf05549562ba20a3d01f354674e078fee256caa.tar.gz
gdb-fcf05549562ba20a3d01f354674e078fee256caa.tar.bz2
* 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.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 8a757e4..107bdaf 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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,