This is the mail archive of the
mailing list for the GDB project.
Re: watchpoint on variable in function scope
> From: Tom Tromey <email@example.com>
> Cc: gdb <firstname.lastname@example.org>
> Date: Thu, 02 Jun 2011 11:22:03 -0600
> >>>>> "Niko" == Niko Sams <email@example.com> writes:
> Niko> please have a look at the example code below.
> Niko> How can i set a watchpoint on i before starting the appliaction?
> Niko> it used to work with
> Niko> "watch foo::i"
> When did this work?
> I tried 6.8 and 7.1 and neither worked.
I also think that it never worked. You need to have the variable in
scope to be able to watch it.