Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sterling Augustine <saugustine@google.com>
To: gdb-patches@sourceware.org
Subject: [Patch] More responsive QUITs
Date: Wed, 13 Jul 2011 03:03:00 -0000	[thread overview]
Message-ID: <CAEG7qUyG6S3pFiXsC2uyiPm8-WSexXBF64Gy+ARnF-wb30uKEA@mail.gmail.com> (raw)

[-- 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);
     }

             reply	other threads:[~2011-07-12 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  3:03 Sterling Augustine [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEG7qUyG6S3pFiXsC2uyiPm8-WSexXBF64Gy+ARnF-wb30uKEA@mail.gmail.com \
    --to=saugustine@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox