aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
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/guile
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/guile')
-rw-r--r--gdb/guile/scm-progspace.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/guile/scm-progspace.c b/gdb/guile/scm-progspace.c
index 57c88d3..9fc650c 100644
--- a/gdb/guile/scm-progspace.c
+++ b/gdb/guile/scm-progspace.c
@@ -285,20 +285,19 @@ gdbscm_progspace_objfiles (SCM self)
{
pspace_smob *p_smob
= psscm_get_valid_pspace_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
- struct objfile *objfile;
SCM result;
result = SCM_EOL;
- ALL_PSPACE_OBJFILES (p_smob->pspace, objfile)
- {
- if (objfile->separate_debug_objfile_backlink == NULL)
- {
- SCM item = ofscm_scm_from_objfile (objfile);
+ for (objfile *objfile : all_objfiles (p_smob->pspace))
+ {
+ if (objfile->separate_debug_objfile_backlink == NULL)
+ {
+ SCM item = ofscm_scm_from_objfile (objfile);
- result = scm_cons (item, result);
- }
- }
+ result = scm_cons (item, result);
+ }
+ }
/* We don't really have to return the list in the same order as recorded
internally, but for consistency we do. We still advertise that one