This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Watchpoints with condition


>>>>> "Jim" == Jim Blandy <jimb@codesourcery.com> writes:

 Jim> Michael Snyder <msnyder at specifix.com> writes:
 >> On Tue, 2007-12-04 at 06:23 +0200, Eli Zaretskii wrote:
 >>> > Cc: gdb@sourceware.org > From: Jim Blandy
 >>> <jimb@codesourcery.com> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]