This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Watchpoints with condition
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb at sourceware dot org
- Date: Mon, 3 Dec 2007 13:11:19 -0500
- Subject: Re: Watchpoints with condition
- References: <200711301925.20196.vladimir@codesourcery.com> <uhcj31lko.fsf@gnu.org> <m3eje7ux9u.fsf@codesourcery.com> <20071130234853.GA27583@caradoc.them.org> <m3odd74qam.fsf@codesourcery.com>
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