aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/source.c19
2 files changed, 12 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 56e4341..b8d0117 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2014-11-10 Doug Evans <xdje42@gmail.com>
+ * source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
+
+2014-11-10 Doug Evans <xdje42@gmail.com>
+
PR symtab/17564
* symtab.c (lookup_symbol_in_all_objfiles): Delete.
(lookup_static_symbol): Move definition to new location and rewrite.
diff --git a/gdb/source.c b/gdb/source.c
index 19c2562..1bb19c9 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -291,19 +291,16 @@ select_source_symtab (struct symtab *s)
current_source_line = 1;
- ALL_OBJFILES (ofp)
+ ALL_SYMTABS (ofp, s)
{
- for (s = ofp->symtabs; s; s = s->next)
- {
- const char *name = s->filename;
- int len = strlen (name);
+ const char *name = s->filename;
+ int len = strlen (name);
- if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
- || strcmp (name, "<<C++-namespaces>>") == 0)))
- {
- current_source_pspace = current_program_space;
- current_source_symtab = s;
- }
+ if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
+ || strcmp (name, "<<C++-namespaces>>") == 0)))
+ {
+ current_source_pspace = current_program_space;
+ current_source_symtab = s;
}
}