Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Make 'info func' interruptible.
@ 2009-07-23 12:09 Paul Pluzhnikov
  2009-07-23 16:31 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Pluzhnikov @ 2009-07-23 12:09 UTC (permalink / raw)
  To: gdb-patches; +Cc: ppluzhnikov

Greetings,

This is rather on the obvious side.

For a large (300MB) debug binary, doing 'info func' (without regex)
puts GDB into 10 minute uniterruptible 100% CPU spin.

While improving the 10 minute wait will hopefully be a subject of
another patch, attached patch makes the wait interruptible.

Thanks,
--
Paul Pluzhnikov

2009-07-22  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* symtab.c (search_symbols): Add QUIT.


Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.213
diff -u -p -u -r1.213 symtab.c
--- symtab.c	2 Jul 2009 17:21:07 -0000	1.213
+++ symtab.c	23 Jul 2009 01:47:08 -0000
@@ -3243,6 +3243,8 @@ search_symbols (char *regexp, domain_enu
     {
       ALL_MSYMBOLS (objfile, msymbol)
       {
+        QUIT;
+
 	if (MSYMBOL_TYPE (msymbol) == ourtype ||
 	    MSYMBOL_TYPE (msymbol) == ourtype2 ||
 	    MSYMBOL_TYPE (msymbol) == ourtype3 ||


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] Make 'info func' interruptible.
  2009-07-23 12:09 [patch] Make 'info func' interruptible Paul Pluzhnikov
@ 2009-07-23 16:31 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2009-07-23 16:31 UTC (permalink / raw)
  To: Paul Pluzhnikov; +Cc: gdb-patches

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> 2009-07-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
Paul> 	* symtab.c (search_symbols): Add QUIT.

This is ok.

There's another ALL_MSYMBOLS loop at the end of the function.
If you want to add a QUIT there, too, that is also ok.

Tom


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-23 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 12:09 [patch] Make 'info func' interruptible Paul Pluzhnikov
2009-07-23 16:31 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox