Remove ALL_OBJSECTIONS
authorTom Tromey <tom@tromey.com>
Sat, 24 Nov 2018 18:54:26 +0000 (11:54 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 10 Jan 2019 01:28:15 +0000 (18:28 -0700)
commit3b9d3ac236dcc418619785e0660fc0063e6489b8
treecf889e1bf17b40f716551bb173c9189a45a33a99
parent8b31193aa9752ba60d63cedaba943370d76ce543
Remove ALL_OBJSECTIONS

This removes the ALL_OBJSECTIONS macro, replacing its uses with ranged
for loops.

The special code in this macro for noticing a "break" from the inner
loop was only needed in a single place; so rather than try to
replicate this, I've simply replaced that use with a "goto".

gdb/ChangeLog
2019-01-09  Tom Tromey  <tom@tromey.com>

* symfile.c (overlay_invalidate_all, find_pc_overlay)
(find_pc_mapped_section, list_overlays_command)
(map_overlay_command, unmap_overlay_command)
(simple_overlay_update): Use all_objfiles.
* spu-tdep.c (spu_overlay_update): Use all_objfiles.
* printcmd.c (info_symbol_command): Use all_objfiles.
* objfiles.h (ALL_OBJSECTIONS): Remove.
* maint.c (maintenance_translate_address): Use all_objfiles.
* gcore.c (gcore_create_callback): Use all_objfiles.
(objfile_find_memory_regions): Likewise.
gdb/ChangeLog
gdb/gcore.c
gdb/maint.c
gdb/objfiles.h
gdb/printcmd.c
gdb/spu-tdep.c
gdb/symfile.c