aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-08-20 11:21:44 +0000
committerPedro Alves <palves@redhat.com>2008-08-20 11:21:44 +0000
commitf1f6aadf8c572a21149a59d65adc49f2df5feeb6 (patch)
tree9b51311b5d16685c2c5201142c196a33a7c157b2 /gdb/symfile.c
parentb365f677216c4c4c40877340b1dcbc2926f60671 (diff)
downloadgdb-f1f6aadf8c572a21149a59d65adc49f2df5feeb6.zip
gdb-f1f6aadf8c572a21149a59d65adc49f2df5feeb6.tar.gz
gdb-f1f6aadf8c572a21149a59d65adc49f2df5feeb6.tar.bz2
* objfiles.h (struct obj_section): Remove addr and endaddr fields.
(obj_section_offset, obj_section_addr, obj_section_endaddr): New macros. * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr and offset. Use size_t instead of unsigned long. (build_objfile_section_table): Use size_t instead of unsigned long. (objfile_relocate): Don't relocate s->addr and s->endaddr, they're gone. (find_pc_sect_section): Use obj_section_addr and obj_section_endaddr. * symfile.c (symfile.c): Remove code that maps sections offsets in "addr" to the object's sections. * blockframe.c (find_pc_partial_function): Use obj_section_endaddr. * gcore.c (gcore_create_callback): Use obj_section_addr and obj_section_endaddr. * maint.c (print_objfile_section_info): Likewise. * printcmd.c (sym_info): Use obj_section_addr and obj_section_endaddr. * symtab.c (fixup_section): Likewise.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index b80ef2a..faa375b 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -895,56 +895,6 @@ syms_from_objfile (struct objfile *objfile,
init_objfile_sect_indices (objfile);
}
-#ifndef DEPRECATED_IBM6000_TARGET
- /* This is a SVR4/SunOS specific hack, I think. In any event, it
- screws RS/6000. sym_offsets should be doing this sort of thing,
- because it knows the mapping between bfd sections and
- section_offsets. */
- /* This is a hack. As far as I can tell, section offsets are not
- target dependent. They are all set to addr with a couple of
- exceptions. The exceptions are sysvr4 shared libraries, whose
- offsets are kept in solib structures anyway and rs6000 xcoff
- which handles shared libraries in a completely unique way.
-
- Section offsets are built similarly, except that they are built
- by adding addr in all cases because there is no clear mapping
- from section_offsets into actual sections. Note that solib.c
- has a different algorithm for finding section offsets.
-
- These should probably all be collapsed into some target
- independent form of shared library support. FIXME. */
-
- if (addrs)
- {
- struct obj_section *s;
-
- /* Map section offsets in "addr" back to the object's
- sections by comparing the section names with bfd's
- section names. Then adjust the section address by
- the offset. */ /* for gdb/13815 */
-
- ALL_OBJFILE_OSECTIONS (objfile, s)
- {
- CORE_ADDR s_addr = 0;
- int i;
-
- for (i = 0;
- !s_addr && i < addrs->num_sections && addrs->other[i].name;
- i++)
- if (strcmp (bfd_section_name (s->objfile->obfd,
- s->the_bfd_section),
- addrs->other[i].name) == 0)
- s_addr = addrs->other[i].addr; /* end added for gdb/13815 */
-
- s->addr -= s->offset;
- s->addr += s_addr;
- s->endaddr -= s->offset;
- s->endaddr += s_addr;
- s->offset += s_addr;
- }
- }
-#endif /* not DEPRECATED_IBM6000_TARGET */
-
(*objfile->sf->sym_read) (objfile, mainline);
/* Don't allow char * to have a typename (else would get caddr_t).