* [RFA] watch for ^c in maint info {symtabs,psymtabs}
@ 2008-10-04 7:29 Doug Evans
2008-10-04 12:48 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2008-10-04 7:29 UTC (permalink / raw)
To: gdb-patches
If debugging a large app, it's painful if ^c doesn't work in
maint info {symtabs,psymtabs}.
Ok to check in?
2008-10-04 Doug Evans <dje@google.com>
* symmisc.c (maintenance_info_symtabs): Watch for ^c.
(maintenance_info_psymtabs): Ditto.
Index: symmisc.c
===================================================================
RCS file: /cvs/src/src/gdb/symmisc.c,v
retrieving revision 1.58
diff -u -p -u -p -r1.58 symmisc.c
--- symmisc.c 3 Oct 2008 16:36:10 -0000 1.58
+++ symmisc.c 4 Oct 2008 07:23:59 -0000
@@ -937,6 +937,8 @@ maintenance_info_symtabs (char *regexp,
actually find a symtab whose name matches. */
int printed_objfile_start = 0;
+ QUIT;
+
ALL_OBJFILE_SYMTABS (objfile, symtab)
if (! regexp
|| re_exec (symtab->filename))
@@ -988,6 +990,8 @@ maintenance_info_psymtabs (char *regexp,
actually find a symtab whose name matches. */
int printed_objfile_start = 0;
+ QUIT;
+
ALL_OBJFILE_PSYMTABS (objfile, psymtab)
if (! regexp
|| re_exec (psymtab->filename))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] watch for ^c in maint info {symtabs,psymtabs}
2008-10-04 7:29 [RFA] watch for ^c in maint info {symtabs,psymtabs} Doug Evans
@ 2008-10-04 12:48 ` Daniel Jacobowitz
2008-10-04 16:57 ` Doug Evans
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-10-04 12:48 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Sat, Oct 04, 2008 at 12:28:25AM -0700, Doug Evans wrote:
> If debugging a large app, it's painful if ^c doesn't work in
> maint info {symtabs,psymtabs}.
>
> Ok to check in?
Shouldn't it be inside the loop?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] watch for ^c in maint info {symtabs,psymtabs}
2008-10-04 12:48 ` Daniel Jacobowitz
@ 2008-10-04 16:57 ` Doug Evans
2008-10-04 18:15 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2008-10-04 16:57 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
On Sat, Oct 4, 2008 at 5:47 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Sat, Oct 04, 2008 at 12:28:25AM -0700, Doug Evans wrote:
>> If debugging a large app, it's painful if ^c doesn't work in
>> maint info {symtabs,psymtabs}.
>>
>> Ok to check in?
>
> Shouldn't it be inside the loop?
You mean "Shouldn't it be inside the inner loop?"
How about this?
[-- Attachment #2: gdb-081004-symmisc-2.patch.txt --]
[-- Type: text/plain, Size: 8236 bytes --]
2008-10-04 Doug Evans <dje@google.com>
* symmisc.c (maintenance_info_symtabs): Watch for ^c.
(maintenance_info_psymtabs): Ditto.
==== //depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c#1 - /usr/local/google/home/dje/ctools/gdb/dwarf-reduction/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c ====
--- /tmp/g4-67641/cache/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c#1 2008-10-04 00:23:12.000000000 -0700
+++ /usr/local/google/home/dje/ctools/gdb/dwarf-reduction/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c 2008-10-04 09:44:11.000000000 -0700
@@ -1015,32 +1015,36 @@
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");
@@ -1066,70 +1070,74 @@
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");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] watch for ^c in maint info {symtabs,psymtabs}
2008-10-04 16:57 ` Doug Evans
@ 2008-10-04 18:15 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-10-04 18:15 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Sat, Oct 04, 2008 at 09:56:55AM -0700, Doug Evans wrote:
> 2008-10-04 Doug Evans <dje@google.com>
>
> * symmisc.c (maintenance_info_symtabs): Watch for ^c.
> (maintenance_info_psymtabs): Ditto.
Yeah, I think this is a better idea; each objfile can be quite large.
OK.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-04 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-04 7:29 [RFA] watch for ^c in maint info {symtabs,psymtabs} Doug Evans
2008-10-04 12:48 ` Daniel Jacobowitz
2008-10-04 16:57 ` Doug Evans
2008-10-04 18:15 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox