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


On Mon, Dec 03, 2007 at 09:54:41AM -0800, Jim Blandy wrote:
> Okay, so 'watch foo if foo == 1' has some interesting behavior:
> - if foo is 1 when the watchpoint is set, then the watchpoint doesn't
>   trigger until foo becomes != 1, and then becomes 1 again.
> - If foo is != 1 when the watchpoint is set, then the command is
>   equivalent to watch foo == 1.

No.  When foo goes back to zero, "watch foo == 1" stops.  "watch foo
if foo == 1" does not.

-- 
Daniel Jacobowitz
CodeSourcery


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