aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-06 17:27:55 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-06 17:27:55 -0800
commit2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a (patch)
tree20d531bc9e31caf93609bc0e3747fd67afb86d98 /gdb/ada-lang.c
parentd4c589159dbfe23b7f5de393359da8a9dab854ed (diff)
downloadgdb-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/ada-lang.c')
-rw-r--r--gdb/ada-lang.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 5793cd2..4320eec 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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
- 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;
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;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);