aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-11-23 11:58:27 -0700
committerTom Tromey <tom@tromey.com>2019-01-09 18:28:14 -0700
commit99d89cdea6c296bdd94ce532350d139d3900ff78 (patch)
treeb7f8d547f554f4925fec808d4e6cfd048b09c254 /gdb/objfiles.c
parent217083254a26b9e1dc42c43f573054740988c2cf (diff)
downloadgdb-99d89cdea6c296bdd94ce532350d139d3900ff78.zip
gdb-99d89cdea6c296bdd94ce532350d139d3900ff78.tar.gz
gdb-99d89cdea6c296bdd94ce532350d139d3900ff78.tar.bz2
Remove ALL_PSPACE_OBJFILES
This removes the ALL_PSPACE_OBJFILES macro in favor of ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * probe.c (parse_probes_in_pspace): Use all_objfiles. * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use all_objfiles. * objfiles.h (ALL_PSPACE_OBJFILES): Remove. * symmisc.c (print_symbol_bcache_statistics) (print_objfile_statistics, maintenance_print_objfiles) (maintenance_info_symtabs, maintenance_check_symtabs) (maintenance_expand_symtabs, maintenance_info_line_tables): Use all_objfiles. * source.c (forget_cached_source_info): Use all_objfiles. * symfile-debug.c (set_debug_symfile): Use all_objfiles. * elfread.c (elf_gnu_ifunc_resolve_by_cache) (elf_gnu_ifunc_resolve_by_got): Use all_objfiles. * objfiles.c (update_section_map): Use all_objfiles. (shared_objfile_contains_address_p): Likewise. * psymtab.c (maintenance_info_psymtabs): Use all_objfiles. * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 4776b60..f8a0dc2 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1322,7 +1322,6 @@ update_section_map (struct program_space *pspace,
struct objfile_pspace_info *pspace_info;
int alloc_size, map_size, i;
struct obj_section *s, **map;
- struct objfile *objfile;
pspace_info = get_objfile_pspace_data (pspace);
gdb_assert (pspace_info->section_map_dirty != 0
@@ -1332,7 +1331,7 @@ update_section_map (struct program_space *pspace,
xfree (map);
alloc_size = 0;
- ALL_PSPACE_OBJFILES (pspace, objfile)
+ for (objfile *objfile : all_objfiles (pspace))
ALL_OBJFILE_OSECTIONS (objfile, s)
if (insert_section_p (objfile->obfd, s->the_bfd_section))
alloc_size += 1;
@@ -1348,7 +1347,7 @@ update_section_map (struct program_space *pspace,
map = XNEWVEC (struct obj_section *, alloc_size);
i = 0;
- ALL_PSPACE_OBJFILES (pspace, objfile)
+ for (objfile *objfile : all_objfiles (pspace))
ALL_OBJFILE_OSECTIONS (objfile, s)
if (insert_section_p (objfile->obfd, s->the_bfd_section))
map[i++] = s;
@@ -1492,9 +1491,7 @@ int
shared_objfile_contains_address_p (struct program_space *pspace,
CORE_ADDR address)
{
- struct objfile *objfile;
-
- ALL_PSPACE_OBJFILES (pspace, objfile)
+ for (objfile *objfile : all_objfiles (pspace))
{
if ((objfile->flags & OBJF_SHARED) != 0
&& is_addr_in_objfile (address, objfile))