aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.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/symtab.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/symtab.c')
-rw-r--r--gdb/symtab.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5eb7ced..5d53959 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1517,18 +1517,17 @@ lookup_symbol_aux_objfile (struct objfile *objfile, int block_index,
objfile->sf->qf->pre_expand_symtabs_matching (objfile, block_index,
name, domain);
- ALL_OBJFILE_SYMTABS (objfile, s)
- if (s->primary)
- {
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, block_index);
- sym = lookup_block_symbol (block, name, domain);
- if (sym)
- {
- block_found = block;
- return fixup_symbol_section (sym, objfile);
- }
- }
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
+ {
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, block_index);
+ sym = lookup_block_symbol (block, name, domain);
+ if (sym)
+ {
+ block_found = block;
+ return fixup_symbol_section (sym, objfile);
+ }
+ }
return NULL;
}
@@ -1829,17 +1828,16 @@ basic_lookup_transparent_type (const char *name)
GLOBAL_BLOCK,
name, STRUCT_DOMAIN);
- ALL_OBJFILE_SYMTABS (objfile, s)
- if (s->primary)
- {
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
- if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
- {
- return SYMBOL_TYPE (sym);
- }
- }
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
+ {
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
+ if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
+ {
+ return SYMBOL_TYPE (sym);
+ }
+ }
}
ALL_OBJFILES (objfile)