Debugger will not show local variables

Mar 26, 2007 2 Replies

This issue might have been posted before, and if so please direct me to the solution.



The problem is that when I am debugging my CNU gcc compiled C code with the GDB debugger it claims it cannot find local variables and thus show their values. Global variables works fine.



Any clues?



Thanks,



Jens.


Maybe your locals are optimized out by the compiler - try to build your code with -O0

:wq ^X^Cy^K^X^C^C^C^C

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required