* symmisc.c (maintenance_info_symtabs): Watch for ^c.
authorDoug Evans <dje@google.com>
Mon, 6 Oct 2008 21:07:48 +0000 (21:07 +0000)
committerDoug Evans <dje@google.com>
Mon, 6 Oct 2008 21:07:48 +0000 (21:07 +0000)
(maintenance_info_psymtabs): Ditto.

gdb/ChangeLog
gdb/symmisc.c

index 63a58661077f841ae0959f5bb8e758fe22be6434..1c09d3b6e70ca733dddb1991d384dd43f7e5ebe3 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-06  Doug Evans  <dje@google.com>
+
+       * symmisc.c (maintenance_info_symtabs): Watch for ^c.
+       (maintenance_info_psymtabs): Ditto.
+
 2008-10-05  Michael Snyder  <msnyder@vmware.com>
 
        * infrun.c (handle_inferior_event): Fix typo in comment.
index a9cf5f5215b175f0d721328396c60f84a92077f3..ae524482ed78e2e00751af7b23671b55662a0145 100644 (file)
@@ -938,32 +938,36 @@ maintenance_info_symtabs (char *regexp, int from_tty)
       int printed_objfile_start = 0;
 
       ALL_OBJFILE_SYMTABS (objfile, symtab)
-        if (! regexp
-            || re_exec (symtab->filename))
-          {
-            if (! printed_objfile_start)
-              {
-                printf_filtered ("{ objfile %s ", objfile->name);
-                wrap_here ("  ");
-                printf_filtered ("((struct objfile *) %p)\n", objfile);
-                printed_objfile_start = 1;
-              }
-
-            printf_filtered ("  { symtab %s ", symtab->filename);
-            wrap_here ("    ");
-            printf_filtered ("((struct symtab *) %p)\n", symtab);
-            printf_filtered ("    dirname %s\n",
-                             symtab->dirname ? symtab->dirname : "(null)");
-            printf_filtered ("    fullname %s\n",
-                             symtab->fullname ? symtab->fullname : "(null)");
-            printf_filtered ("    blockvector ((struct blockvector *) %p)%s\n",
-                             symtab->blockvector,
-                             symtab->primary ? " (primary)" : "");
-            printf_filtered ("    linetable ((struct linetable *) %p)\n",
-                             symtab->linetable);
-            printf_filtered ("    debugformat %s\n", symtab->debugformat);
-            printf_filtered ("  }\n");
-          }
+       {
+         QUIT;
+
+         if (! regexp
+             || re_exec (symtab->filename))
+           {
+             if (! printed_objfile_start)
+               {
+                 printf_filtered ("{ objfile %s ", objfile->name);
+                 wrap_here ("  ");
+                 printf_filtered ("((struct objfile *) %p)\n", objfile);
+                 printed_objfile_start = 1;
+               }
+
+             printf_filtered ("        { symtab %s ", symtab->filename);
+             wrap_here ("    ");
+             printf_filtered ("((struct symtab *) %p)\n", symtab);
+             printf_filtered ("          dirname %s\n",
+                              symtab->dirname ? symtab->dirname : "(null)");
+             printf_filtered ("          fullname %s\n",
+                              symtab->fullname ? symtab->fullname : "(null)");
+             printf_filtered ("          blockvector ((struct blockvector *) %p)%s\n",
+                              symtab->blockvector,
+                              symtab->primary ? " (primary)" : "");
+             printf_filtered ("          linetable ((struct linetable *) %p)\n",
+                              symtab->linetable);
+             printf_filtered ("          debugformat %s\n", symtab->debugformat);
+             printf_filtered ("        }\n");
+           }
+       }
 
       if (printed_objfile_start)
         printf_filtered ("}\n");
@@ -989,70 +993,74 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
       int printed_objfile_start = 0;
 
       ALL_OBJFILE_PSYMTABS (objfile, psymtab)
-        if (! regexp
-            || re_exec (psymtab->filename))
-          {
-            if (! printed_objfile_start)
-              {
-                printf_filtered ("{ objfile %s ", objfile->name);
-                wrap_here ("  ");
-                printf_filtered ("((struct objfile *) %p)\n", objfile);
-                printed_objfile_start = 1;
-              }
-
-            printf_filtered ("  { psymtab %s ", psymtab->filename);
-            wrap_here ("    ");
-            printf_filtered ("((struct partial_symtab *) %p)\n", psymtab);
-            printf_filtered ("    readin %s\n",
-                             psymtab->readin ? "yes" : "no");
-            printf_filtered ("    fullname %s\n",
-                             psymtab->fullname ? psymtab->fullname : "(null)");
-            printf_filtered ("    text addresses ");
-           fputs_filtered (paddress (psymtab->textlow), gdb_stdout);
-            printf_filtered (" -- ");
-           fputs_filtered (paddress (psymtab->texthigh), gdb_stdout);
-            printf_filtered ("\n");
-            printf_filtered ("    globals ");
-            if (psymtab->n_global_syms)
-              {
-                printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
-                                 (psymtab->objfile->global_psymbols.list
-                                  + psymtab->globals_offset),
-                                 psymtab->n_global_syms);
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("    statics ");
-            if (psymtab->n_static_syms)
-              {
-                printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
-                                 (psymtab->objfile->static_psymbols.list
-                                  + psymtab->statics_offset),
-                                 psymtab->n_static_syms);
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("    dependencies ");
-            if (psymtab->number_of_dependencies)
-              {
-                int i;
-
-                printf_filtered ("{\n");
-                for (i = 0; i < psymtab->number_of_dependencies; i++)
-                  {
-                    struct partial_symtab *dep = psymtab->dependencies[i];
-
-                    /* Note the string concatenation there --- no comma.  */
-                    printf_filtered ("      psymtab %s "
-                                     "((struct partial_symtab *) %p)\n",
-                                     dep->filename, dep);
-                  }
-                printf_filtered ("    }\n");
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("  }\n");
-          }
+       {
+         QUIT;
+
+         if (! regexp
+             || re_exec (psymtab->filename))
+           {
+             if (! printed_objfile_start)
+               {
+                 printf_filtered ("{ objfile %s ", objfile->name);
+                 wrap_here ("  ");
+                 printf_filtered ("((struct objfile *) %p)\n", objfile);
+                 printed_objfile_start = 1;
+               }
+
+             printf_filtered ("  { psymtab %s ", psymtab->filename);
+             wrap_here ("    ");
+             printf_filtered ("((struct partial_symtab *) %p)\n", psymtab);
+             printf_filtered ("    readin %s\n",
+                              psymtab->readin ? "yes" : "no");
+             printf_filtered ("    fullname %s\n",
+                              psymtab->fullname ? psymtab->fullname : "(null)");
+             printf_filtered ("    text addresses ");
+             fputs_filtered (paddress (psymtab->textlow), gdb_stdout);
+             printf_filtered (" -- ");
+             fputs_filtered (paddress (psymtab->texthigh), gdb_stdout);
+             printf_filtered ("\n");
+             printf_filtered ("    globals ");
+             if (psymtab->n_global_syms)
+               {
+                 printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
+                                  (psymtab->objfile->global_psymbols.list
+                                   + psymtab->globals_offset),
+                                  psymtab->n_global_syms);
+               }
+             else
+               printf_filtered ("(none)\n");
+             printf_filtered ("    statics ");
+             if (psymtab->n_static_syms)
+               {
+                 printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
+                                  (psymtab->objfile->static_psymbols.list
+                                   + psymtab->statics_offset),
+                                  psymtab->n_static_syms);
+               }
+             else
+               printf_filtered ("(none)\n");
+             printf_filtered ("    dependencies ");
+             if (psymtab->number_of_dependencies)
+               {
+                 int i;
+
+                 printf_filtered ("{\n");
+                 for (i = 0; i < psymtab->number_of_dependencies; i++)
+                   {
+                     struct partial_symtab *dep = psymtab->dependencies[i];
+
+                     /* Note the string concatenation there --- no comma.  */
+                     printf_filtered ("      psymtab %s "
+                                      "((struct partial_symtab *) %p)\n",
+                                      dep->filename, dep);
+                   }
+                 printf_filtered ("    }\n");
+               }
+             else
+               printf_filtered ("(none)\n");
+             printf_filtered ("  }\n");
+           }
+       }
 
       if (printed_objfile_start)
         printf_filtered ("}\n");