diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-22 20:42:37 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-22 20:42:37 +0000 |
commit | 4365c36c9b87e20565b20c52809c781c50831a18 (patch) | |
tree | fd18d65814126ec28fd97ac1212534fb7df2eeb4 /gdb/objfiles.h | |
parent | 87fe2d9df2930715c261130be8d41c5a1a41f7a7 (diff) | |
download | gdb-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.h')
-rw-r--r-- | gdb/objfiles.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 3cc5de1..3912999 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -114,16 +114,39 @@ struct entry_info }; -/* This structure is used to map pc values into sections. Note that - offset is currently target independent and is redundant to the - section_offsets field in the objfile struct. FIXME. */ +/* Sections in an objfile. + + It is strange that we have both this notion of "sections" + and the one used by section_offsets. Section as used + here, (currently at least) means a BFD section, and the sections + are set up from the BFD sections in allocate_objfile. + + The sections in section_offsets have their meaning determined by + the symbol format, and they are set up by the sym_offsets function + for that symbol file format. + + I'm not sure this could or should be changed, however. */ struct obj_section { CORE_ADDR addr; /* lowest address in section */ CORE_ADDR endaddr; /* 1+highest address in section */ - CORE_ADDR offset; /* offset between (end)addr and actual - memory addresses. */ + + /* This field is being used for nefarious purposes by syms_from_objfile. + It is said to be redundant with section_offsets; it's not really being + used that way, however, it's some sort of hack I don't understand + and am not going to try to eliminate (yet, anyway). FIXME. + + It was documented as "offset between (end)addr and actual memory + addresses", but that's not true; addr & endaddr are actual memory + addresses. */ + CORE_ADDR offset; + sec_ptr sec_ptr; /* BFD section pointer */ + + /* Objfile this section is part of. Not currently used, but I'm sure + that someone will want the bfd that the sec_ptr goes with or something + like that before long. */ + struct objfile *objfile; }; /* Master structure for keeping track of each input file from which @@ -353,7 +376,7 @@ have_full_symbols PARAMS ((void)); extern int have_minimal_symbols PARAMS ((void)); -extern sec_ptr +extern struct obj_section * find_pc_section PARAMS((CORE_ADDR pc)); /* Traverse all object files. ALL_OBJFILES_SAFE works even if you delete |