diff options
author | Doug Evans <xdje42@gmail.com> | 2014-11-06 17:27:55 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-11-06 17:27:55 -0800 |
commit | 2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a (patch) | |
tree | 20d531bc9e31caf93609bc0e3747fd67afb86d98 /gdb/symtab.c | |
parent | d4c589159dbfe23b7f5de393359da8a9dab854ed (diff) | |
download | gdb-2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a.zip gdb-2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a.tar.gz gdb-2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a.tar.bz2 |
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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 01ddb91..e9f37bc 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1549,8 +1549,10 @@ lookup_objfile_from_block (const struct block *block) return NULL; block = block_global_block (block); - /* Go through SYMTABS. */ - ALL_SYMTABS (obj, s) + /* Go through SYMTABS. + 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 (obj->separate_debug_objfile_backlink) |