While debugging a C program in gdb I have a breakpoint in a for loop. I cannot print the value of \"i\" ( I get : No symbol \"i\" in current context.). I can print the value of
You can try declaring i as volatile. That will prevent some compiler optimizations (and hopefully make i visible inside the debugger).
volatile
i