aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-22 20:42:37 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-22 20:42:37 +0000
commit4365c36c9b87e20565b20c52809c781c50831a18 (patch)
treefd18d65814126ec28fd97ac1212534fb7df2eeb4 /gdb/objfiles.c
parent87fe2d9df2930715c261130be8d41c5a1a41f7a7 (diff)
downloadgdb-4365c36c9b87e20565b20c52809c781c50831a18.zip
gdb-4365c36c9b87e20565b20c52809c781c50831a18.tar.gz
gdb-4365c36c9b87e20565b20c52809c781c50831a18.tar.bz2
* objfiles.h (obj_section), objfiles.c (build_objfile_section_table):
Add objfile field. * objfiles.c (find_pc_section): Return a struct obj_section *. * sparc-tdep.c (in_solib_trampoline): Deal with find_pc_section return. * symfile.c (syms_from_objfile) [IBM6000_TARGET]: Don't use obj_section hack. * xcoffexec (vmap_symtab): Relocate obj_sections. * printcmd.c (containing_function_bounds): Use find_pc_section.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 94b5f57..ac238ab 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -81,6 +81,7 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
if (0 == bfd_section_size (abfd, asect))
return;
section.offset = 0;
+ section.objfile = objfile;
section.sec_ptr = asect;
section.addr = bfd_section_vma (abfd, asect);
section.endaddr = section.addr + bfd_section_size (abfd, asect);
@@ -715,7 +716,7 @@ map_to_address ()
/* Returns a section whose range includes PC or NULL if none found. */
-sec_ptr
+struct obj_section *
find_pc_section(pc)
CORE_ADDR pc;
{
@@ -726,7 +727,7 @@ find_pc_section(pc)
for (s = objfile->sections; s < objfile->sections_end; ++s)
if (s->addr <= pc
&& pc < s->endaddr)
- return(s->sec_ptr);
+ return(s);
return(NULL);
}