aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-06-04 03:07:03 +0000
committerDoug Evans <dje@google.com>2012-06-04 03:07:03 +0000
commit78e5175a52db89d5e51fdbcb020ef040f68fe5c1 (patch)
tree714d0d22b4527be5b4e00070c89cfacf052f0dd2
parentd790cf0a9cd4ac9c90668788215bb0b7f0095387 (diff)
downloadgdb-78e5175a52db89d5e51fdbcb020ef040f68fe5c1.zip
gdb-78e5175a52db89d5e51fdbcb020ef040f68fe5c1.tar.gz
gdb-78e5175a52db89d5e51fdbcb020ef040f68fe5c1.tar.bz2
* symtab.c (lookup_global_symbol_from_objfile): Only scan blockvector
of primary symtab. (basic_lookup_transparent_type): Ditto.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/symtab.c24
2 files changed, 16 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7efd705..20fd853 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2012-06-03 Doug Evans <dje@google.com>
+ * symtab.c (lookup_global_symbol_from_objfile): Only scan blockvector
+ of primary symtab.
+ (basic_lookup_transparent_type): Ditto.
+
* objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.
(ALL_PRIMARY_SYMTABS): Use it.
(ALL_PSPACE_PRIMARY_SYMTABS): Ditto.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5d53959..318310a 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1478,17 +1478,17 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
objfile = objfile_separate_debug_iterate (main_objfile, objfile))
{
/* Go through symtabs. */
- ALL_OBJFILE_SYMTABS (objfile, s)
- {
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, name, domain);
- if (sym)
- {
- block_found = block;
- return fixup_symbol_section (sym, (struct objfile *)objfile);
- }
- }
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
+ {
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ sym = lookup_block_symbol (block, name, domain);
+ if (sym)
+ {
+ block_found = block;
+ return fixup_symbol_section (sym, (struct objfile *)objfile);
+ }
+ }
sym = lookup_symbol_aux_quick ((struct objfile *) objfile, GLOBAL_BLOCK,
name, domain);
@@ -1860,7 +1860,7 @@ basic_lookup_transparent_type (const char *name)
objfile->sf->qf->pre_expand_symtabs_matching (objfile, STATIC_BLOCK,
name, STRUCT_DOMAIN);
- ALL_OBJFILE_SYMTABS (objfile, s)
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);