diff options
author | Doug Evans <xdje42@gmail.com> | 2014-11-10 16:49:44 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-11-10 16:49:44 -0800 |
commit | 712a2e6d225f2139be6954c948d8db2787071051 (patch) | |
tree | e9670c7dd099a4818e6aac49dd80bb2f628b6c7d /gdb/source.c | |
parent | af3768e945b188caa141e3285dc3eb84f440a673 (diff) | |
download | gdb-712a2e6d225f2139be6954c948d8db2787071051.zip gdb-712a2e6d225f2139be6954c948d8db2787071051.tar.gz gdb-712a2e6d225f2139be6954c948d8db2787071051.tar.bz2 |
source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
gdb/ChangeLog:
* source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
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; } } |