From 99d89cdea6c296bdd94ce532350d139d3900ff78 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 23 Nov 2018 11:58:27 -0700 Subject: Remove ALL_PSPACE_OBJFILES This removes the ALL_PSPACE_OBJFILES macro in favor of ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey * 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. --- gdb/symfile-debug.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'gdb/symfile-debug.c') diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index 28bbd2c..b71fa8b 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -660,22 +660,21 @@ static void set_debug_symfile (const char *args, int from_tty, struct cmd_list_element *c) { struct program_space *pspace; - struct objfile *objfile; ALL_PSPACES (pspace) - ALL_PSPACE_OBJFILES (pspace, objfile) - { - if (debug_symfile) - { - if (!symfile_debug_installed (objfile)) - install_symfile_debug_logging (objfile); - } - else - { - if (symfile_debug_installed (objfile)) - uninstall_symfile_debug_logging (objfile); - } - } + for (objfile *objfile : all_objfiles (pspace)) + { + if (debug_symfile) + { + if (!symfile_debug_installed (objfile)) + install_symfile_debug_logging (objfile); + } + else + { + if (symfile_debug_installed (objfile)) + uninstall_symfile_debug_logging (objfile); + } + } } static void -- cgit v1.1