aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-26 16:57:22 +0000
committerTom Tromey <tromey@redhat.com>2012-07-26 16:57:22 +0000
commit27618ce42a9eaeb1c95bca6ed8f2a261df0e6981 (patch)
tree7dfb3727c93632e3332fbe7cfb4e0a869f51bee2 /gdb/symmisc.c
parentdd3818c82cb19570b6b7ddaac277d5f212a432c2 (diff)
downloadgdb-27618ce42a9eaeb1c95bca6ed8f2a261df0e6981.zip
gdb-27618ce42a9eaeb1c95bca6ed8f2a261df0e6981.tar.gz
gdb-27618ce42a9eaeb1c95bca6ed8f2a261df0e6981.tar.bz2
* 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.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index d5a737b..d3028e6 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -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);
+ }
}