This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Somewhat sanitize watchpoints with conditions on local expressions
On Thursday 04 March 2010 16:00:07, Pedro Alves wrote:
> > That, or maybe just disable the watchpoint and keep going?
> > It's unclear
> > what the user intent is, but maybe he really meant for the watchpoint
> > to be local to the scope where the condition applies?
One extra comment. I though of making the watchpoint trigger only
exactly in the frame where the condition was set, so to
conditionalize on a particular local instance, but I thought that
if the user wants that behavior, he can emulate it by:
(gdb) p &local
(gdb) watch global if *$ > 10.
But there's no way to emulate what the patch allows, and
it seemed intuitive, so went with it, and so the user can
have it both ways.
--
Pedro Alves