aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 85e15c3..74c895c 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -288,13 +288,13 @@ select_source_symtab (struct symtab *s)
if (current_source_symtab)
return;
- ALL_OBJFILES (ofp)
- {
- if (ofp->sf)
- s = ofp->sf->qf->find_last_source_symtab (ofp);
- if (s)
- current_source_symtab = s;
- }
+ for (objfile *objfile : all_objfiles (current_program_space))
+ {
+ if (objfile->sf)
+ s = objfile->sf->qf->find_last_source_symtab (objfile);
+ if (s)
+ current_source_symtab = s;
+ }
if (current_source_symtab)
return;