* symmisc.c (print_symbol_bcache_statistics): Use QUIT, not
authorTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 16:57:22 +0000 (16:57 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 16:57:22 +0000 (16:57 +0000)
immediate_quit.
(print_objfile_statistics): Likewise.
(maintenance_print_symbols): Likewise.
(maintenance_print_msymbols): Likewise.
(maintenance_print_objfiles): Likewise.
* psymtab.c (print_partial_symbols): Call QUIT.
(maintenance_print_psymbols): Likewise.  Don't modify
immediate_quit.
* copying.c (show_copying_command): Don't modify immediate_quit.
(show_warranty_command): Likewise.
* cli/cli-cmds.c (show_version): Don't modify immediate_quit.

gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/copying.c
gdb/psymtab.c
gdb/symmisc.c

index 2906dad814a770551561c9c431f5c8349c8df712..3830a7e4589efbb71373c1c8eacda0c667ae2d31 100644 (file)
@@ -1,3 +1,18 @@
+2012-07-26  Tom Tromey  <tromey@redhat.com>
+
+       * symmisc.c (print_symbol_bcache_statistics): Use QUIT, not
+       immediate_quit.
+       (print_objfile_statistics): Likewise.
+       (maintenance_print_symbols): Likewise.
+       (maintenance_print_msymbols): Likewise.
+       (maintenance_print_objfiles): Likewise.
+       * psymtab.c (print_partial_symbols): Call QUIT.
+       (maintenance_print_psymbols): Likewise.  Don't modify
+       immediate_quit.
+       * copying.c (show_copying_command): Don't modify immediate_quit.
+       (show_warranty_command): Likewise.
+       * cli/cli-cmds.c (show_version): Don't modify immediate_quit.
+
 2012-07-26  Keith Seitz  <keiths@redhat.com>
 
        * linespec.c (linespec_lexer_lex_number): The input
index 24d55c388073b428511863297c9387c201fc7a23..f2328e8ce7d3b1e33b8cd9dc8090ef2579d1f06d 100644 (file)
@@ -319,10 +319,8 @@ is_complete_command (struct cmd_list_element *c)
 static void
 show_version (char *args, int from_tty)
 {
-  immediate_quit++;
   print_gdb_version (gdb_stdout);
   printf_filtered ("\n");
-  immediate_quit--;
 }
 
 /* Handle the quit command.  */
index d608a63669e4cc924ac290fa15403fa768f8a594..9aac2e690a30ca1f56317e9d8f1c3feec9993fde 100644 (file)
@@ -11,15 +11,13 @@ static void show_warranty_command (char *, int);
 
 void _initialize_copying (void);
 
-extern int immediate_quit;
 static void
 show_copying_command (char *ignore, int from_tty)
 {
-  immediate_quit++;
   printf_filtered ("                    GNU GENERAL PUBLIC LICENSE\n");
   printf_filtered ("                       Version 3, 29 June 2007\n");
   printf_filtered ("\n");
-  printf_filtered (" Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n");
+  printf_filtered (" Copyright (C) 2007, 2012 Free Software Foundation, Inc. <http://fsf.org/>\n");
   printf_filtered (" Everyone is permitted to copy and distribute verbatim copies\n");
   printf_filtered (" of this license document, but changing it is not allowed.\n");
   printf_filtered ("\n");
@@ -604,13 +602,11 @@ show_copying_command (char *ignore, int from_tty)
   printf_filtered ("author or copyright holder as a result of your choosing to follow a\n");
   printf_filtered ("later version.\n");
   printf_filtered ("\n");
-  immediate_quit--;
 }
 
 static void
 show_warranty_command (char *ignore, int from_tty)
 {
-  immediate_quit++;
   printf_filtered ("  15. Disclaimer of Warranty.\n");
   printf_filtered ("\n");
   printf_filtered ("  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n");
@@ -643,7 +639,6 @@ show_warranty_command (char *ignore, int from_tty)
   printf_filtered ("Program, unless a warranty or assumption of liability accompanies a\n");
   printf_filtered ("copy of the Program in return for a fee.\n");
   printf_filtered ("\n");
-  immediate_quit--;
 }
 
 void
index 5623e2dc5f8ba30d6b1aa52cb6c9fa3579855d70..93be08546881cb64becab6ff96c3da8594ba7b65 100644 (file)
@@ -888,6 +888,7 @@ print_partial_symbols (struct gdbarch *gdbarch,
   fprintf_filtered (outfile, "  %s partial symbols:\n", what);
   while (count-- > 0)
     {
+      QUIT;
       fprintf_filtered (outfile, "    `%s'", SYMBOL_LINKAGE_NAME (*p));
       if (SYMBOL_DEMANGLED_NAME (*p) != NULL)
        {
@@ -1852,11 +1853,12 @@ print-psymbols takes an output file name and optional symbol file name"));
     perror_with_name (filename);
   make_cleanup_ui_file_delete (outfile);
 
-  immediate_quit++;
   ALL_PSYMTABS (objfile, ps)
-    if (symname == NULL || filename_cmp (symname, ps->filename) == 0)
-    dump_psymtab (objfile, ps, outfile);
-  immediate_quit--;
+    {
+      QUIT;
+      if (symname == NULL || filename_cmp (symname, ps->filename) == 0)
+       dump_psymtab (objfile, ps, outfile);
+    }
   do_cleanups (cleanups);
 }
 
index d5a737b0498593ec1452fab3f9eb2cda73e7e4de..d3028e66ba82742ffafdd35897cb58ac5e5ce75a 100644 (file)
@@ -85,17 +85,16 @@ print_symbol_bcache_statistics (void)
   struct program_space *pspace;
   struct objfile *objfile;
 
-  immediate_quit++;
   ALL_PSPACES (pspace)
     ALL_PSPACE_OBJFILES (pspace, objfile)
   {
+    QUIT;
     printf_filtered (_("Byte cache statistics for '%s':\n"), objfile->name);
     print_bcache_statistics (psymbol_bcache_get_bcache (objfile->psymbol_cache),
                              "partial symbol cache");
     print_bcache_statistics (objfile->macro_cache, "preprocessor macro cache");
     print_bcache_statistics (objfile->filename_cache, "file name cache");
   }
-  immediate_quit--;
 }
 
 void
@@ -106,10 +105,10 @@ print_objfile_statistics (void)
   struct symtab *s;
   int i, linetables, blockvectors;
 
-  immediate_quit++;
   ALL_PSPACES (pspace)
     ALL_PSPACE_OBJFILES (pspace, objfile)
   {
+    QUIT;
     printf_filtered (_("Statistics for '%s':\n"), objfile->name);
     if (OBJSTAT (objfile, n_stabs) > 0)
       printf_filtered (_("  Number of \"stab\" symbols read: %d\n"),
@@ -156,7 +155,6 @@ print_objfile_statistics (void)
     printf_filtered (_("  Total memory used for file name cache: %d\n"),
                     bcache_memory_used (objfile->filename_cache));
   }
-  immediate_quit--;
 }
 
 static void
@@ -437,11 +435,12 @@ maintenance_print_symbols (char *args, int from_tty)
     perror_with_name (filename);
   make_cleanup_ui_file_delete (outfile);
 
-  immediate_quit++;
   ALL_SYMTABS (objfile, s)
-    if (symname == NULL || filename_cmp (symname, s->filename) == 0)
-    dump_symtab (objfile, s, outfile);
-  immediate_quit--;
+    {
+      QUIT;
+      if (symname == NULL || filename_cmp (symname, s->filename) == 0)
+       dump_symtab (objfile, s, outfile);
+    }
   do_cleanups (cleanups);
 }
 
@@ -663,13 +662,14 @@ maintenance_print_msymbols (char *args, int from_tty)
     perror_with_name (filename);
   make_cleanup_ui_file_delete (outfile);
 
-  immediate_quit++;
   ALL_PSPACES (pspace)
     ALL_PSPACE_OBJFILES (pspace, objfile)
-      if (symname == NULL || (!stat (objfile->name, &obj_st)
-                             && sym_st.st_ino == obj_st.st_ino))
-       dump_msymbols (objfile, outfile);
-  immediate_quit--;
+      {
+       QUIT;
+       if (symname == NULL || (!stat (objfile->name, &obj_st)
+                               && sym_st.st_ino == obj_st.st_ino))
+         dump_msymbols (objfile, outfile);
+      }
   fprintf_filtered (outfile, "\n\n");
   do_cleanups (cleanups);
 }
@@ -682,11 +682,12 @@ maintenance_print_objfiles (char *ignore, int from_tty)
 
   dont_repeat ();
 
-  immediate_quit++;
   ALL_PSPACES (pspace)
     ALL_PSPACE_OBJFILES (pspace, objfile)
-      dump_objfile (objfile);
-  immediate_quit--;
+      {
+       QUIT;
+       dump_objfile (objfile);
+      }
 }
 
 
This page took 0.03468 seconds and 4 git commands to generate.