Use ALL_PRIMARY_SYMTABS instead of ALL_SYMTABS in some places.
Non-primary symtabs share the block vector with their primary symtabs. In these cases there's no need to use ALL_SYMTABS. gdb/ChangeLog: * ada-lang.c (ada_make_symbol_completion_list): Use ALL_PRIMARY_SYMTABS instead of ALL_SYMTABS. * symtab.c (lookup_objfile_from_block): Ditto.
This commit is contained in:
parent
d4c589159d
commit
2dd2cd1c92
3 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-11-06 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
|
* ada-lang.c (ada_make_symbol_completion_list): Use
|
||||||
|
ALL_PRIMARY_SYMTABS instead of ALL_SYMTABS.
|
||||||
|
* symtab.c (lookup_objfile_from_block): Ditto.
|
||||||
|
|
||||||
2014-11-06 Doug Evans <xdje42@gmail.com>
|
2014-11-06 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
* gdbtypes.h (TYPE_CODE_CLASS): Delete. All uses changed to use
|
* gdbtypes.h (TYPE_CODE_CLASS): Delete. All uses changed to use
|
||||||
|
|
|
@ -6212,9 +6212,11 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Go through the symtabs and check the externs and statics for
|
/* Go through the symtabs and check the externs and statics for
|
||||||
symbols which match. */
|
symbols which match.
|
||||||
|
Non-primary symtabs share the block vector with their primary symtabs
|
||||||
|
so we use ALL_PRIMARY_SYMTABS here instead of ALL_SYMTABS. */
|
||||||
|
|
||||||
ALL_SYMTABS (objfile, s)
|
ALL_PRIMARY_SYMTABS (objfile, s)
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
|
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
|
||||||
|
@ -6226,7 +6228,7 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ALL_SYMTABS (objfile, s)
|
ALL_PRIMARY_SYMTABS (objfile, s)
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
|
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
|
||||||
|
|
|
@ -1549,8 +1549,10 @@ lookup_objfile_from_block (const struct block *block)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
block = block_global_block (block);
|
block = block_global_block (block);
|
||||||
/* Go through SYMTABS. */
|
/* Go through SYMTABS.
|
||||||
ALL_SYMTABS (obj, s)
|
Non-primary symtabs share the block vector with their primary symtabs
|
||||||
|
so we use ALL_PRIMARY_SYMTABS here instead of ALL_SYMTABS. */
|
||||||
|
ALL_PRIMARY_SYMTABS (obj, s)
|
||||||
if (block == BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK))
|
if (block == BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK))
|
||||||
{
|
{
|
||||||
if (obj->separate_debug_objfile_backlink)
|
if (obj->separate_debug_objfile_backlink)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue