source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.
authorDoug Evans <xdje42@gmail.com>
Tue, 11 Nov 2014 00:49:44 +0000 (16:49 -0800)
committerDoug Evans <xdje42@gmail.com>
Tue, 11 Nov 2014 00:49:44 +0000 (16:49 -0800)
gdb/ChangeLog:

* source.c (select_source_symtab): Rewrite to use ALL_SYMTABS.

gdb/ChangeLog
gdb/source.c

index 56e43410fcb20c0ba7c304e1f653c5297ed0e2a4..b8d011726ec240781119dfabe3275ff85b35b3da 100644 (file)
@@ -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
index 19c25623758b0f7d9a10379a694c44e50b688849..1bb19c9d5fc2f9b87202be00973714b62a77f422 100644 (file)
@@ -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;
        }
     }
 
This page took 0.046003 seconds and 4 git commands to generate.