Forum Discussion
Altera_Forum
Honored Contributor
15 years agoLook at the generated code...
gdb can't really guarantee to give you the values of variables that are in registers. Although if you aren't compiling with -O2 (you really should use -O2 or -O3) then it is likely that all the expected code (including all the load/stores from stack for the local variables) is actually generated. Marking global data 'volatile' will force all references in the C source to generate load/store instructions.