aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-11-23 17:32:08 -0700
committerTom Tromey <tom@tromey.com>2019-01-09 18:28:15 -0700
commit5325b9bf1ee283c40f076334eb3ea66e1f0a6ade (patch)
tree4964d0282ac4cb82ed0a6691cbccf4062c3799d8 /gdb/stabsread.c
parentcac85af2467c9bac326b397b150274d95d2916a5 (diff)
downloadgdb-5325b9bf1ee283c40f076334eb3ea66e1f0a6ade.zip
gdb-5325b9bf1ee283c40f076334eb3ea66e1f0a6ade.tar.gz
gdb-5325b9bf1ee283c40f076334eb3ea66e1f0a6ade.tar.bz2
Remove ALL_MSYMBOLS and ALL_OBJFILE_MSYMBOLS
This removes the ALL_MSYMBOLS and ALL_OBJFILE_MSYMBOLS macros, replacing their uses with ranged for loops. In a couple of spots, a new declaration was needed in order to work around shadowing; these are just temporary and are removed in a subsequent patch. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * symtab.c (search_symbols) (default_collect_symbol_completion_matches_break_on): Use objfile_msymbols. * ada-lang.c (ada_lookup_simple_minsym) (ada_collect_symbol_completion_matches): Use objfile_msymbols. * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols. * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use objfile_msymbols. * coffread.c (coff_symfile_read): Use objfile_msymbols. * symmisc.c (dump_msymbols): Use objfile_msymbols. * objc-lang.c (find_methods): Use objfile_msymbols. (info_selectors_command, info_classes_command): Likewise. * stabsread.c (scan_file_globals): Use objfile_msymbols. * objfiles.h (class objfile_msymbols): New. (ALL_OBJFILE_MSYMBOLS): Remove. (ALL_MSYMBOLS): Remove.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 8d2599f..daba7cb 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -4573,7 +4573,6 @@ void
scan_file_globals (struct objfile *objfile)
{
int hash;
- struct minimal_symbol *msymbol;
struct symbol *sym, *prev;
struct objfile *resolve_objfile;
@@ -4599,7 +4598,7 @@ scan_file_globals (struct objfile *objfile)
if (hash >= HASHSIZE)
return;
- ALL_OBJFILE_MSYMBOLS (resolve_objfile, msymbol)
+ for (minimal_symbol *msymbol : objfile_msymbols (resolve_objfile))
{
QUIT;