mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
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.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user