From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29879 invoked by alias); 12 Jan 2012 00:17:44 -0000 Received: (qmail 29859 invoked by uid 22791); 12 Jan 2012 00:17:41 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Jan 2012 00:17:28 +0000 Received: by vbbfn1 with SMTP id fn1so1132722vbb.0 for ; Wed, 11 Jan 2012 16:17:28 -0800 (PST) Received: by 10.52.90.71 with SMTP id bu7mr720142vdb.63.1326327448160; Wed, 11 Jan 2012 16:17:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.90.71 with SMTP id bu7mr720134vdb.63.1326327448041; Wed, 11 Jan 2012 16:17:28 -0800 (PST) Received: by 10.220.229.1 with HTTP; Wed, 11 Jan 2012 16:17:27 -0800 (PST) In-Reply-To: References: Date: Thu, 12 Jan 2012 00:54:00 -0000 Message-ID: Subject: Re: Handle SIGINT in Python From: Doug Evans To: Tom Tromey Cc: Khoo Yit Phang , gdb-patches@sourceware.org X-System-Of-Record: true Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2012-01/txt/msg00389.txt.bz2 On Wed, Jan 11, 2012 at 12:55 PM, Tom Tromey wrote: >>>>>> "Doug" =3D=3D Doug Evans writes: > > Doug> There is value in having the SIGINT *only* affect the inferior. > Doug> It's up to the script to handle the various reasons why the inferior > Doug> may have stopped, and you don't (generally) want to interfere with > Doug> that (by interrupting the script too). > > I think Python code should have to request something like this > specially. =A0The scripting case is less usual than the interactive > debugging (perhaps with some Python helper code) case. =A0I think it would > be weird for the behavior the user sees, by default, to depend on > whether Python or GDB code was active at the moment of C-c. I'm not sure we're talking about the same thing. I wasn't suggesting the behaviour be different depending on whether GDB or Python was running. [For reference sake, to make sure we're on the same page, my comment is solely for the case where the inferior is launched by gdb, the inferior is running, has the terminal, and will get the SIGINT.] > That is, a C-c when processing a 'python' command in a breakpoint's > 'commands' list should have the same general effect as if we were > processing any other command. PTAL.