aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-10-06 21:07:48 +0000
committerDoug Evans <dje@google.com>2008-10-06 21:07:48 +0000
commit8a498d38bec4ed8f542bf436882266fb19f3b2d9 (patch)
treed8b3ca24a8eefd6a3e8363cf6a8685823beb5367
parent4d4175aff7dd65648fe55d13a111fdd90a5dca1b (diff)
downloadgdb-8a498d38bec4ed8f542bf436882266fb19f3b2d9.zip
gdb-8a498d38bec4ed8f542bf436882266fb19f3b2d9.tar.gz
gdb-8a498d38bec4ed8f542bf436882266fb19f3b2d9.tar.bz2
* symmisc.c (maintenance_info_symtabs): Watch for ^c.
(maintenance_info_psymtabs): Ditto.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symmisc.c188
2 files changed, 103 insertions, 90 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63a5866..1c09d3b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index a9cf5f5..ae52448 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");