mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-12 12:16:04 +08:00
source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
gdb/ChangeLog: * source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
This commit is contained in:
parent
af3768e945
commit
712a2e6d22
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
19
gdb/source.c
19
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user