This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: watchpoint on variable in function scope
> From: Tom Tromey <tromey@redhat.com>
> Cc: gdb <gdb@sourceware.org>
> Date: Thu, 02 Jun 2011 11:22:03 -0600
>
> >>>>> "Niko" == Niko Sams <niko.sams@gmail.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.