Bug in the debugger?
Not sure whether this is a GDB or Eclipse behavior, or "feature" of debug info created by gcc compiler...
Debugger in CubeIDE and Atollic refuses to display pointers to volatile.
For example:
volatile char *ptr = some_func();
It always says that such pointers are optimized out.
Very annoying.
Debugger rightly refuses to dereference ptr - but ptr itself is NOT volatile!
Another debugger annoyance: consider a loop in one source line, like this:
while ( foo == 0) {}When debugger tries to step over (F6) such line and the loop won't exit, the pause button (||) becomes unavailable and it's impossible to break in.
The only available action is to stop debug session altogether.
Optimization is either off or "optimize for debug" - neither helps
Regards,
Pavel