This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]