From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30825 invoked by alias); 7 Nov 2007 02:48:32 -0000 Received: (qmail 30814 invoked by uid 22791); 7 Nov 2007 02:48:31 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Nov 2007 02:48:28 +0000 Received: by nf-out-0910.google.com with SMTP id b11so1749962nfh for ; Tue, 06 Nov 2007 18:48:25 -0800 (PST) Received: by 10.78.130.6 with SMTP id c6mr5552313hud.1194403705119; Tue, 06 Nov 2007 18:48:25 -0800 (PST) Received: by 10.78.83.18 with HTTP; Tue, 6 Nov 2007 18:48:25 -0800 (PST) Message-ID: Date: Wed, 07 Nov 2007 02:48:00 -0000 From: "Siva Velusamy" To: gdb@sourceware.org Subject: Re: Ctrl+C when a watchpoint is set gdb In-Reply-To: <20071107024101.GA850@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071107024101.GA850@caradoc.them.org> 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: 2007-11/txt/msg00044.txt.bz2 On Nov 6, 2007 6:41 PM, Daniel Jacobowitz wrote: > On Tue, Nov 06, 2007 at 06:32:04PM -0800, Siva Velusamy wrote: > > However, the function bpstat_explains_signal is defined as follows: > > > > breakpoint.h:547 > > /* Nonzero if a signal that we got in wait() was due to circumstances > > explained by the BS. */ > > /* Currently that is true if we have hit a breakpoint, or if there is > > a watchpoint enabled. */ > > #define bpstat_explains_signal(bs) ((bs) != NULL) > > > > Since there is a watchpoint defined, this ends up evaluating to true, > > even though this is a trap signal caused by Ctrl+C. Eventually, this > > leads to keep_going(ecs) being called. > > You shouldn't be getting to the call to bpstat_explains_signal at all. > Is your remote stub returning the wrong signal for C-c? It should be > TARGET_SIGNAL_INT, not TARGET_SIGNAL_TRAP. > Yes, it is returning TARGET_SIGNAL_TRAP. I will see if making it TARGET_SIGNAL_INT fixes the issue. Following up on your comment, I looked through the definitions of all the signals in signals.c, and I don't think the remote server followed many of the conventions. Thanks for the pointer! -Siva