This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
watchpoint on variable in function scope
- From: Niko Sams <niko dot sams at gmail dot com>
- To: gdb <gdb at sourceware dot org>
- Date: Wed, 1 Jun 2011 23:21:36 +0200
- Subject: watchpoint on variable in function scope
Hi again,
please have a look at the example code below.
How can i set a watchpoint on i before starting the appliaction?
it used to work with
"watch foo::i"
thanks,
Niko
------------------
void foo() {
static int i=0;
++i;
}
int main(int argc, char **argv) {
foo();
return 0;
}