This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Watchpoints with condition
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Michael Snyder <msnyder at specifix dot com>
- Cc: rjshaw at netspace dot net dot au, gdb at sources dot redhat dot com
- Date: Sat, 01 Dec 2007 11:15:45 +0200
- Subject: Re: Watchpoints with condition
- References: <200711301925.20196.vladimir@codesourcery.com> <4750B480.8060106@netspace.net.au> <1196472771.2501.184.camel@localhost.localdomain>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Michael Snyder <msnyder@specifix.com>
> Cc: gdb@sources.redhat.com
> Date: Fri, 30 Nov 2007 17:32:51 -0800
>
> > I frequently need to enable or set a breakpoint only if another
> > previous point in the program has been passed. How do i do that?
>
>
> set $passed_milestone = 0
> break milestone_func
> commands
> silent
> set $passed_milestone = 1
> end
> break conditional_func if ($passed_milestone)
Or just
tbreak milestone_func
commands
silent
break conditional_func
continue
end