Re: Watchpoints with condition

Daniel Jacobowitz
2007-12-03T18:11:38Z

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