aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-01-06 10:11:04 +0000
committerTristan Gingold <gingold@adacore.com>2010-01-06 10:11:04 +0000
commit15d123c99f48b4b4620d87a0e9ee124de1a0659f (patch)
tree5587ecb3e8a4b88fe4d4a5f7aaac474728405d4d /gdb/objfiles.h
parent2010-01-06 Tristan Gingold <gingold@adacore.com> (diff)
downloadbinutils-gdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.tar.gz
binutils-gdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.tar.bz2
binutils-gdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.zip
2010-01-06 Tristan Gingold <gingold@adacore.com>
* symtab.c (lookup_global_symbol_from_objfile): Rename objfile parameter to main_objfile. Iterate on all separate debug objfiles. * symfile.h (symbol_file_add_separate) (find_separate_debug_file_by_debuglink): Remove parameter names. * symfile.c (symbol_file_add_separate): Use add_separate_objfile. (reread_symbols): Use free_objfile_separate_debug. * objfiles.h (struct objfile): Add separate_debug_objfile_link. Adjust comment. (objfile_separate_debug_iterate, add_separate_debug_objfile) (free_objfile_separate_debug): New prototypes. * objfiles.c (objfile_separate_debug_iterate): New function. (add_separate_debug_objfile, free_objfile_separate_debug): New functions. (free_objfile): Use free_objfile_separate_debug. Adjust for multiple separate debug objfile. (objfile_has_symbols): Adjust comment. Iterate on all separate debug objfiles. * minsyms.c (lookup_minimal_symbol): Adjust for multiple separate debug objfile. (lookup_minimal_symbol_text): Ditto. (lookup_minimal_symbol_by_pc_name): Ditto. (lookup_minimal_symbol_solib_trampoline): Ditto. (lookup_minimal_symbol_by_pc_section_1): Iterate on all separate debug objfiles.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index cf5fc38624d..c6896227296 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -363,15 +363,25 @@ struct objfile
struct obj_section
*sections, *sections_end;
- /* Link to objfile that contains the debug symbols for this one.
- One is loaded if this file has an debug link to an existing
- debug file with the right checksum */
+ /* GDB allows to have debug symbols in separate object files. This is
+ used by .gnu_debuglink, ELF build id note and Mach-O OSO.
+ Although this is a tree structure, GDB only support one level
+ (ie a separate debug for a separate debug is not supported). Note that
+ separate debug object are in the main chain and therefore will be
+ visited by ALL_OBJFILES & co iterators. Separate debug objfile always
+ has a non-nul separate_debug_objfile_backlink. */
+
+ /* Link to the first separate debug object, if any. */
struct objfile *separate_debug_objfile;
/* If this is a separate debug object, this is used as a link to the
actual executable objfile. */
struct objfile *separate_debug_objfile_backlink;
-
+
+ /* If this is a separate debug object, this is a link to the next one
+ for the same executable objfile. */
+ struct objfile *separate_debug_objfile_link;
+
/* Place to stash various statistics about this objfile */
OBJSTATS;
@@ -452,14 +462,21 @@ extern int build_objfile_section_table (struct objfile *);
extern void terminate_minimal_symbol_table (struct objfile *objfile);
+extern struct objfile *objfile_separate_debug_iterate (const struct objfile *,
+ const struct objfile *);
+
extern void put_objfile_before (struct objfile *, struct objfile *);
extern void objfile_to_front (struct objfile *);
+extern void add_separate_debug_objfile (struct objfile *, struct objfile *);
+
extern void unlink_objfile (struct objfile *);
extern void free_objfile (struct objfile *);
+extern void free_objfile_separate_debug (struct objfile *);
+
extern struct cleanup *make_cleanup_free_objfile (struct objfile *);
extern void free_all_objfiles (void);