From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17477 invoked by alias); 4 Dec 2007 23:17:09 -0000 Received: (qmail 17466 invoked by uid 22791); 4 Dec 2007 23:17:08 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Dec 2007 23:17:02 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 50BE13B903; Tue, 4 Dec 2007 15:17:00 -0800 (PST) Subject: Re: Watchpoints with condition From: Michael Snyder To: Jim Blandy Cc: Eli Zaretskii , gdb@sourceware.org In-Reply-To: References: <200711301925.20196.vladimir@codesourcery.com> <20071130234853.GA27583@caradoc.them.org> <1196744257.2501.268.camel@localhost.localdomain> Content-Type: text/plain Date: Tue, 04 Dec 2007 23:17:00 -0000 Message-Id: <1196809374.2501.279.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit 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/msg00033.txt.bz2 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?