From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28246 invoked by alias); 4 Dec 2007 05:11:42 -0000 Received: (qmail 28238 invoked by uid 22791); 4 Dec 2007 05:11:41 -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 05:11:34 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id CA01A3BF3B; Mon, 3 Dec 2007 21:11:32 -0800 (PST) Subject: Re: Watchpoints with condition From: Michael Snyder To: Eli Zaretskii Cc: Jim Blandy , gdb@sourceware.org In-Reply-To: References: <200711301925.20196.vladimir@codesourcery.com> <20071130234853.GA27583@caradoc.them.org> Content-Type: text/plain Date: Tue, 04 Dec 2007 05:11:00 -0000 Message-Id: <1196744257.2501.268.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/msg00020.txt.bz2 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?