diff options
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 19 |
1 files changed, 8 insertions, 11 deletions
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; } } |