This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Fix places in symtab.c that should only scan primary symtabs
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Thu, 24 May 2012 23:34:26 -0700 (PDT)
- Subject: [patch] Fix places in symtab.c that should only scan primary symtabs
Hi.
This patch seems obvious enough, blockvectors are shared between
the primary symtab and its, umm, secondary symtabs.
It builds needs the ALL_OBJFILE_PRIMARY_SYMTABS patch I just posted.
I will check this in in a few days if there are no objections.
2012-05-24 Doug Evans <dje@google.com>
* symtab.c (lookup_global_symbol_from_objfile): Only scan blockvector
of primary symtab.
(basic_lookup_transparent_type): Ditto.
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.306
diff -u -p -r1.306 symtab.c
--- symtab.c 24 May 2012 02:51:48 -0000 1.306
+++ symtab.c 25 May 2012 06:12:14 -0000
@@ -1478,7 +1478,7 @@ lookup_global_symbol_from_objfile (const
objfile = objfile_separate_debug_iterate (main_objfile, objfile))
{
/* Go through symtabs. */
- ALL_OBJFILE_SYMTABS (objfile, s)
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
{
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
@@ -1862,7 +1860,7 @@ basic_lookup_transparent_type (const cha
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);