From 8a498d38bec4ed8f542bf436882266fb19f3b2d9 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 6 Oct 2008 21:07:48 +0000 Subject: [PATCH] * symmisc.c (maintenance_info_symtabs): Watch for ^c. (maintenance_info_psymtabs): Ditto. --- gdb/ChangeLog | 5 ++ gdb/symmisc.c | 188 ++++++++++++++++++++++++++------------------------ 2 files changed, 103 insertions(+), 90 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 63a58661077..1c09d3b6e70 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-10-06 Doug Evans + + * symmisc.c (maintenance_info_symtabs): Watch for ^c. + (maintenance_info_psymtabs): Ditto. + 2008-10-05 Michael Snyder * infrun.c (handle_inferior_event): Fix typo in comment. diff --git a/gdb/symmisc.c b/gdb/symmisc.c index a9cf5f5215b..ae524482ed7 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -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"); -- 2.30.2