From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12562 invoked by alias); 4 Mar 2010 07:57:24 -0000 Received: (qmail 12553 invoked by uid 22791); 4 Mar 2010 07:57:24 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 07:57:20 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nn5vq-0006aX-Dp; Thu, 04 Mar 2010 02:57:18 -0500 From: Eli Zaretskii To: Joel Brobecker CC: pedro@codesourcery.com, gdb-patches@sourceware.org In-reply-to: <20100304055926.GI2832@adacore.com> (message from Joel Brobecker on Thu, 4 Mar 2010 09:59:26 +0400) Subject: Re: Somewhat sanitize watchpoints with conditions on local expressions Reply-to: Eli Zaretskii References: <201003040350.34417.pedro@codesourcery.com> <20100304055926.GI2832@adacore.com> Message-Id: Date: Thu, 04 Mar 2010 07:57:00 -0000 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: 2010-03/txt/msg00164.txt.bz2 > Date: Thu, 4 Mar 2010 09:59:26 +0400 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > > IMO, GBB could be smarted, and check if it makes sense > > to evaluate the condition in the current frame before > > actualy trying, and stop if it doesn't, with an short blurb: > > > > (gdb) c > > Continuing. > > warning: Watchpoint condition can't tested in the current scope > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > That, or maybe just disable the watchpoint and keep going? Personally, I hate it when GDB disables watchpoints automatically, since more often than not, it does the Wrong Thing.