Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [Patch] More responsive QUITs
@ 2011-07-13  3:03 Sterling Augustine
  2011-07-15 20:49 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Sterling Augustine @ 2011-07-13  3:03 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

Hello,

Enclosed is a patch that adds calls to QUIT in various places which
makes GDB more responsive to CTRL-C. In particular, reading a symbol
file at start up can now be interrupted (although perhaps still not as
responsive as one might like), as well as various other long running
operations. I know at least two GDB developers have one or another of
these on their TODO lists.

All three of these calls to QUIT have relatively close cleanup handlers:

The new call in dwarf2_build_psymtabs is cleaned up by the handlers in
the same function.
Likewise for the new call in process_type_comp_unit, which is just a
level or two down.

The new call in map_symbol_filenames_psymtab occurs in a location
where I don't believe there could be any inconsistent state.

Comments?

Sterling

=-=-=-=-=-
2011-07-12  Sterling Augustine  <saugustine@google.com>

	* dwarf2read.c (process_type_comp_unit): Call QUIT.
	(dwarf2_build_psymtabs_hard): Likewise.
	* psymtab.c (map_symbol_filenames_psymtab): Likewise.

[-- Attachment #2: quit.patch --]
[-- Type: text/x-patch, Size: 1127 bytes --]

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.550
diff -d -u -r1.550 dwarf2read.c
--- dwarf2read.c	12 Jul 2011 20:59:03 -0000	1.550
+++ dwarf2read.c	12 Jul 2011 22:18:49 -0000
@@ -3417,6 +3417,7 @@
   struct objfile *objfile = (struct objfile *) info;
   struct dwarf2_per_cu_data *this_cu;
 
+  QUIT;
   this_cu = &entry->per_cu;
 
   gdb_assert (dwarf2_per_objfile->types.readin);
@@ -3500,6 +3501,7 @@
     {
       struct dwarf2_per_cu_data *this_cu;
 
+      QUIT;
       this_cu = dwarf2_find_comp_unit (info_ptr
 				       - dwarf2_per_objfile->info.buffer,
 				       objfile);
Index: psymtab.c
===================================================================
RCS file: /cvs/src/src/gdb/psymtab.c,v
retrieving revision 1.30
diff -d -u -r1.30 psymtab.c
--- psymtab.c	10 Jun 2011 21:48:04 -0000	1.30
+++ psymtab.c	12 Jul 2011 22:18:49 -0000
@@ -1093,6 +1093,7 @@
       if (ps->readin)
 	continue;
 
+      QUIT;
       fullname = psymtab_to_fullname (ps);
       (*fun) (ps->filename, fullname, data);
     }

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

end of thread, other threads:[~2011-07-25 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13  3:03 [Patch] More responsive QUITs Sterling Augustine
2011-07-15 20:49 ` Tom Tromey
2011-07-20 18:46   ` Sterling Augustine
2011-07-22  1:14     ` Tom Tromey
     [not found]       ` <CAEG7qUxKevmBX=oCXr2p+x-zi-ZbBGLf3Gmb-X2bnVBpf7VKGA@mail.gmail.com>
     [not found]         ` <m3wrf6qeii.fsf@fleche.redhat.com>
2011-07-25 21:07           ` Sterling Augustine
2011-07-25 21:41             ` Tom Tromey

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