I am trying to debug code using gdb, but when I try to watch my variable color it say this
No symbol "color" in current context.
The variable is a int and is clearly in the scope. the code is as follow
int color=0;
if(color==0)
color=1;
and my debugger is passed the declaration of the variable.
I am only doing, with a break point at the if(color==0)
(gdb) watch color
I might suspect the compiler or something, is that possible?
Edit : there is some issues with debugging in constructors with GDB