From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27805 invoked by alias); 4 Dec 2007 17:24:10 -0000 Received: (qmail 27797 invoked by uid 22791); 4 Dec 2007 17:24:09 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Dec 2007 17:24:01 +0000 Received: (qmail 14965 invoked from network); 4 Dec 2007 17:23:54 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Dec 2007 17:23:54 -0000 To: Michael Snyder Cc: Eli Zaretskii , 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> From: Jim Blandy Date: Tue, 04 Dec 2007 17:24:00 -0000 In-Reply-To: <1196744257.2501.268.camel@localhost.localdomain> (Michael Snyder's message of "Mon, 03 Dec 2007 20:57:37 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00025.txt.bz2 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? I guess I don't see why 'GDB stops your program whenever the value of this expression changes' is hard to understand. Explaining conditional watchpoints is a superset of explaining watchpoints, so I don't see how it could be simpler. *shrug*