From e9008c2b0a04cc8dbb62eaaad5c82258730ccc94 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 6 Jan 2010 10:11:02 +0000 Subject: 2010-01-06 Tristan Gingold * 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. --- gdb/minsyms.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gdb/minsyms.c') diff --git a/gdb/minsyms.c b/gdb/minsyms.c index c177c02abc6..ee730a449a9 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -216,7 +216,7 @@ lookup_minimal_symbol (const char *name, const char *sfile, objfile = objfile->next) { if (objf == NULL || objf == objfile - || objf->separate_debug_objfile == objfile) + || objf == objfile->separate_debug_objfile_backlink) { /* Do two passes: the first over the ordinary hash table, and the second over the demangled hash table. */ @@ -324,7 +324,7 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf) objfile = objfile->next) { if (objf == NULL || objf == objfile - || objf->separate_debug_objfile == objfile) + || objf == objfile->separate_debug_objfile_backlink) { for (msymbol = objfile->msymbol_hash[hash]; msymbol != NULL && found_symbol == NULL; @@ -377,7 +377,7 @@ lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name, objfile = objfile->next) { if (objf == NULL || objf == objfile - || objf->separate_debug_objfile == objfile) + || objf == objfile->separate_debug_objfile_backlink) { for (msymbol = objfile->msymbol_hash[hash]; msymbol != NULL; @@ -416,7 +416,7 @@ lookup_minimal_symbol_solib_trampoline (const char *name, objfile = objfile->next) { if (objf == NULL || objf == objfile - || objf->separate_debug_objfile == objfile) + || objf == objfile->separate_debug_objfile_backlink) { for (msymbol = objfile->msymbol_hash[hash]; msymbol != NULL && found_symbol == NULL; @@ -473,11 +473,10 @@ lookup_minimal_symbol_by_pc_section_1 (CORE_ADDR pc, no telling which one will have the minimal symbols. */ gdb_assert (section != NULL); - objfile = section->objfile; - if (objfile->separate_debug_objfile) - objfile = objfile->separate_debug_objfile; - for (; objfile != NULL; objfile = objfile->separate_debug_objfile_backlink) + for (objfile = section->objfile; + objfile != NULL; + objfile = objfile_separate_debug_iterate (section->objfile, objfile)) { /* If this objfile has a minimal symbol table, go search it using a binary search. Note that a minimal symbol table always consists -- cgit v1.2.1