aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-04-16 09:10:02 -0600
committerTom Tromey <tom@tromey.com>2023-05-07 12:44:17 -0600
commit8e8d48f91c26cb4aabbdc56d96608e5d2310b986 (patch)
treeebce18957e2404e7dcd07c5784457107f021218c /gdb/objfiles.c
parent5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec (diff)
downloadfsf-binutils-gdb-8e8d48f91c26cb4aabbdc56d96608e5d2310b986.zip
fsf-binutils-gdb-8e8d48f91c26cb4aabbdc56d96608e5d2310b986.tar.gz
fsf-binutils-gdb-8e8d48f91c26cb4aabbdc56d96608e5d2310b986.tar.bz2
Remove ALL_DICT_SYMBOLS
This replaces ALL_DICT_SYMBOLS with an iterator so that for-each can be used.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 3fefc4a..5ba5f0a 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -625,9 +625,6 @@ objfile_relocate1 (struct objfile *objfile,
for (block *b : bv->blocks ())
{
- struct symbol *sym;
- struct mdict_iterator miter;
-
b->set_start (b->start () + delta[block_line_section]);
b->set_end (b->end () + delta[block_line_section]);
@@ -639,10 +636,8 @@ objfile_relocate1 (struct objfile *objfile,
/* We only want to iterate over the local symbols, not any
symbols in included symtabs. */
- ALL_DICT_SYMBOLS (b->multidict (), miter, sym)
- {
- relocate_one_symbol (sym, objfile, delta);
- }
+ for (struct symbol *sym : b->multidict_symbols ())
+ relocate_one_symbol (sym, objfile, delta);
}
}