From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31752 invoked by alias); 11 Jul 2008 15:03:18 -0000 Received: (qmail 31744 invoked by uid 22791); 11 Jul 2008 15:03:18 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jul 2008 15:02:58 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AB53698415; Fri, 11 Jul 2008 15:02:56 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8084A98376; Fri, 11 Jul 2008 15:02:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KHK99-0002JO-LZ; Fri, 11 Jul 2008 11:02:55 -0400 Date: Fri, 11 Jul 2008 15:03:00 -0000 From: Daniel Jacobowitz To: Robert Norton Cc: gdb@sourceware.org Subject: Re: Watchpoints and Ctrl-C Message-ID: <20080711150255.GA8572@caradoc.them.org> Mail-Followup-To: Robert Norton , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) 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-07/txt/msg00122.txt.bz2 On Fri, Jul 11, 2008 at 07:48:47AM -0700, Robert Norton wrote: > Hi, > > The function bpstat_stop_status in breakpoints.c calls > watchpoint_check() via catch_errors with a mask of RETURN_MASK_ALL. This > means that if the user presses Ctrl-C whilst a watchpoint is being > evaluated (as is quite likely if using software watchpoints on a > simulator target) then GDB issues the message "Error evaluating > watchpoint x" and deletes the watchpoint. Of course there wasn't really > an error so this is quite confusing! > > Shouldn't this be using RETURN_MASK_ERROR? > > There's a similar call to breakpoint_cond_eval which might require the > same treatment. Perhaps. I think most uses of RETURN_MASK_ALL are incorrect. There are some where, correct or not, it is necessary - I remember a conversation with Vladimir about this during review of this patch: 2008-05-05 Vladimir Prus * inf-loop.c (inferior_event_handler): Call bpstat_do_action, and catch all exceptions from it. * top.c (command_line_handler_continuation): Don't call bpstat_do_action here. -- Daniel Jacobowitz CodeSourcery