From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30414 invoked by alias); 4 Dec 2007 17:30:00 -0000 Received: (qmail 30404 invoked by uid 22791); 4 Dec 2007 17:29:59 -0000 X-Spam-Check-By: sourceware.org Received: from exprod8og102.obsmtp.com (HELO exprod8og102.obsmtp.com) (64.18.3.84) by sourceware.org (qpsmtpd/0.31) with SMTP; Tue, 04 Dec 2007 17:29:50 +0000 Received: from source ([12.110.134.31]) by exprod8ob102.postini.com ([64.18.7.12]) with SMTP; Tue, 04 Dec 2007 09:28:22 PST Received: from pkoning-laptop.equallogic.com.equallogic.com ([172.25.202.114]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 4 Dec 2007 12:27:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18261.36348.314085.746805@pkoning-laptop.equallogic.com> Date: Tue, 04 Dec 2007 17:30:00 -0000 From: Paul Koning To: jimb@codesourcery.com Cc: msnyder@specifix.com, eliz@gnu.org, gdb@sourceware.org Subject: Re: Watchpoints with condition References: <200711301925.20196.vladimir@codesourcery.com> <20071130234853.GA27583@caradoc.them.org> <1196744257.2501.268.camel@localhost.localdomain> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid 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-12/txt/msg00026.txt.bz2 >>>>> "Jim" == Jim Blandy writes: Jim> Michael Snyder writes: >> On Tue, 2007-12-04 at 06:23 +0200, Eli Zaretskii wrote: >>> > Cc: gdb@sourceware.org > From: Jim Blandy >>> > Date: Mon, 03 Dec 2007 15:07:19 -0800 >>> > >>> > In the use case you mention, why wouldn't 'watch v == X'; >>> 'watch v == > Y'; etc. have worked for you? You would have >>> gotten more hits than > you'd like, but only twice as many --- is >>> that right? >>> >>> It would have shown me hits I don't want to see, yes. And it is >>> more natural to write "watch X if X == 1" than what you suggest. >> I have to agree -- typing "watch X == 1" is intuitive to you and >> me (because we're gdb hackers), but it would not be intuitive to >> most users. Besides, as Eli says, it gives you unwanted hits. >> Why would we want to explain all of that (including the unwanted >> hits) to a naive user? Jim> I guess I don't see why 'GDB stops your program whenever the Jim> value of this expression changes' is hard to understand. Jim> Explaining conditional watchpoints is a superset of explaining Jim> watchpoints, so I don't see how it could be simpler. The problem is that "watch xxx" stops whenever xxx is true" is an obvious -- but wrong -- intuition of what the command does. paul