From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24033 invoked by alias); 5 Dec 2007 21:37:02 -0000 Received: (qmail 24022 invoked by uid 22791); 5 Dec 2007 21:37:02 -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; Wed, 05 Dec 2007 21:36:56 +0000 Received: (qmail 18701 invoked from network); 5 Dec 2007 21:36:54 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Dec 2007 21:36: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> <1196809374.2501.279.camel@localhost.localdomain> From: Jim Blandy Date: Wed, 05 Dec 2007 21:37:00 -0000 In-Reply-To: <1196809374.2501.279.camel@localhost.localdomain> (Michael Snyder's message of "Tue, 04 Dec 2007 15:02:54 -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/msg00042.txt.bz2 Michael Snyder writes: > On Tue, 2007-12-04 at 09:23 -0800, Jim Blandy wrote: >> 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. > > Well, since eliminating conditional watchpoints is not on the table, > I guess it's a moot point, eh? Hey, I did shrug. :)