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


> 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


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