From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27797 invoked by alias); 27 Feb 2008 22:45:30 -0000 Received: (qmail 27788 invoked by uid 22791); 27 Feb 2008 22:45:29 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog16.obsmtp.com (HELO s200aog16.obsmtp.com) (207.126.144.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 27 Feb 2008 22:45:00 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Wed, 27 Feb 2008 22:44:57 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AE362DA73 for ; Wed, 27 Feb 2008 22:44:57 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7974D4C25C for ; Wed, 27 Feb 2008 22:44:57 +0000 (GMT) Received: from [164.129.14.85] (bri1017.bri.st.com [164.129.14.85]) by mail1.bri.st.com (MOS 3.7.5a-GA) with ESMTP id CJU33800 (AUTH antony); Wed, 27 Feb 2008 22:44:56 GMT Message-ID: <47C5E7E8.4000309@st.com> Date: Wed, 27 Feb 2008 22:46:00 -0000 From: Antony KING User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Any solution to not being able to interrupt step in GDB ? References: <47C5DD59.5090608@st.com> <20080227221218.GA27709@caradoc.them.org> In-Reply-To: <20080227221218.GA27709@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00236.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Feb 27, 2008 at 09:59:53PM +0000, Antony KING wrote: >> Is there any clean solution I can use which allows me to break out this >> loop if there is a pending SIGINT event waiting to be processed ? There >> seems a be a need for a way to "stop stepping" when Ctrl-C is pressed. >> One thought I have is to fake a target SIGINT signal by checking for a >> pending SIGINT event after returning from target_wait() and modifying >> ecs before calling handle_inferior_event(). > > I can refer you to the reply to the message you linked; which signal > handler is running when not in your "sweet spot"? > The signal handler is the restored default handler, "handle_sigint". My target interface only substitutes that default SIGINT handler when implementing the target_wait() functionality (it is modelled on remote.c). My first thought was that QUIT should achieve the effect I need but quit_flag, as was pointed out, is not being set soon enough. Also, forcing an immediate_quit is not suitable since I would like to stop the stepping cleanly with a target SIGINT (plus it breaks my target interface, but that is my problem :-). Cheers, Antony