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
Make sure the program is compiled without optimization, and with debugging information enabled. It's quite likely that the loop counter ends up in a register.