From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30363 invoked by alias); 12 Jul 2011 22:51:57 -0000 Received: (qmail 30354 invoked by uid 22791); 12 Jul 2011 22:51:56 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 22:51:33 +0000 Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id p6CMpVeg013148 for ; Tue, 12 Jul 2011 15:51:31 -0700 Received: from pzk6 (pzk6.prod.google.com [10.243.19.134]) by wpaz9.hot.corp.google.com with ESMTP id p6CMo5H2012013 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 12 Jul 2011 15:51:30 -0700 Received: by pzk6 with SMTP id 6so5593363pzk.12 for ; Tue, 12 Jul 2011 15:51:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.18.21 with SMTP id v21mr202846wfi.24.1310511089650; Tue, 12 Jul 2011 15:51:29 -0700 (PDT) Received: by 10.142.165.15 with HTTP; Tue, 12 Jul 2011 15:51:29 -0700 (PDT) Date: Wed, 13 Jul 2011 03:03:00 -0000 Message-ID: Subject: [Patch] More responsive QUITs From: Sterling Augustine To: gdb-patches@sourceware.org Content-Type: multipart/mixed; boundary=0016368e2190f90bb404a7e7234b X-System-Of-Record: true Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00333.txt.bz2 --0016368e2190f90bb404a7e7234b Content-Type: text/plain; charset=ISO-8859-1 Content-length: 1002 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 * dwarf2read.c (process_type_comp_unit): Call QUIT. (dwarf2_build_psymtabs_hard): Likewise. * psymtab.c (map_symbol_filenames_psymtab): Likewise. --0016368e2190f90bb404a7e7234b Content-Type: text/x-patch; charset=US-ASCII; name="quit.patch" Content-Disposition: attachment; filename="quit.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gq1gg1950 Content-length: 1530 SW5kZXg6IGR3YXJmMnJlYWQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJD UyBmaWxlOiAvY3ZzL3NyYy9zcmMvZ2RiL2R3YXJmMnJlYWQuYyx2CnJldHJp ZXZpbmcgcmV2aXNpb24gMS41NTAKZGlmZiAtZCAtdSAtcjEuNTUwIGR3YXJm MnJlYWQuYwotLS0gZHdhcmYycmVhZC5jCTEyIEp1bCAyMDExIDIwOjU5OjAz IC0wMDAwCTEuNTUwCisrKyBkd2FyZjJyZWFkLmMJMTIgSnVsIDIwMTEgMjI6 MTg6NDkgLTAwMDAKQEAgLTM0MTcsNiArMzQxNyw3IEBACiAgIHN0cnVjdCBv YmpmaWxlICpvYmpmaWxlID0gKHN0cnVjdCBvYmpmaWxlICopIGluZm87CiAg IHN0cnVjdCBkd2FyZjJfcGVyX2N1X2RhdGEgKnRoaXNfY3U7CiAKKyAgUVVJ VDsKICAgdGhpc19jdSA9ICZlbnRyeS0+cGVyX2N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