aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
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/minsyms.c
parentd2ca6b5b4227727844a9ba907ac40038504b4476 (diff)
downloadgdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.zip
gdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.tar.gz
gdb-15d123c99f48b4b4620d87a0e9ee124de1a0659f.tar.bz2
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/minsyms.c')
-rw-r--r--gdb/minsyms.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index c177c02..ee730a4 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