aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-06-04 02:57:28 +0000
committerDoug Evans <dje@google.com>2012-06-04 02:57:28 +0000
commitd790cf0a9cd4ac9c90668788215bb0b7f0095387 (patch)
tree9f0bb4ab0f1b3f82a49dbabada5d66e814c05912 /gdb/dwarf2read.c
parentbb3a4c10194fcd2be8963749de7a6b88b6deb2c1 (diff)
downloadgdb-d790cf0a9cd4ac9c90668788215bb0b7f0095387.zip
gdb-d790cf0a9cd4ac9c90668788215bb0b7f0095387.tar.gz
gdb-d790cf0a9cd4ac9c90668788215bb0b7f0095387.tar.bz2
* objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.
(ALL_PRIMARY_SYMTABS): Use it. (ALL_PSPACE_PRIMARY_SYMTABS): Ditto. * dwarf2read.c (dw2_find_symbol_file): Ditto. * linespec.c (iterate_over_all_matching_symtabs): Ditto. * symtab.c (lookup_symbol_aux_objfile): Ditto. (basic_lookup_transparent_type): Ditto.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8dbc53e..23779ac 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2842,16 +2842,15 @@ dw2_find_symbol_file (struct objfile *objfile, const char *name)
{
struct symtab *s;
- ALL_OBJFILE_SYMTABS (objfile, s)
- if (s->primary)
- {
- struct blockvector *bv = BLOCKVECTOR (s);
- const struct block *block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- struct symbol *sym = lookup_block_symbol (block, name, VAR_DOMAIN);
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
+ {
+ struct blockvector *bv = BLOCKVECTOR (s);
+ const struct block *block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ struct symbol *sym = lookup_block_symbol (block, name, VAR_DOMAIN);
- if (sym)
- return sym->symtab->filename;
- }
+ if (sym)
+ return sym->symtab->filename;
+ }
return NULL;
}