Watchpoint issues

Vladimir Prus ghost at cs.msu.su
Thu Apr 20 11:12:09 UTC 2006


On Thursday 20 April 2006 13:05, Jens Dagerbo wrote:

> > 2. If the address is in the current stack frame, then leaving the stack
> > frame deletes watchpoints.
> >
> > 3. When debugger has stopped, all watchpoints end up in disabled state.
> > Later, user can re-enable any watchpoint. In this case, the stored
> > expression value will be reevaluated again.
> >
> > 4. If gdb can't set hardware watchpoint, we should produce a big error
> > message, saying "While gdb has software watchpoints, they are too slow to
> > be usefull".
> >
> > Any problems with the above?
> >
> > - Volodya
>
> I have no problems, you seem to have thought it through. :)
>
> I'm curious about point 2 though. Removing a local watchpoint when
> leaving the stack frame  certainly makes sense, but will it possible
> for KDevelop to remember the expression and recreate the watchpoint
> when entering the same scope again?

Ahm... yes. The watchpoint should not be deleted, it should be just 
"disabled", just like after restart. Enabling the watchpoint manually should 
recreate the watchpoint in gdb.

I don't quite believe in auto-reenabling watchpoint for a couple of reasons:

  - Often, user want to re-enable breakpoint at specific position at function,
    not at the very start.
  - Gdb does not provide a mechanism to reliably identify "same scope".

Thanks for feedback!

- Volodya




More information about the KDevelop-devel mailing list