Gcc options for improving debugging?
Paul Koning
pkoning@equallogic.com
Wed Jul 19 17:53:00 GMT 2006
>>>>> "Alex" == Alex Bennee <kernel-hacker@bennee.com> writes:
Alex> Is it the inlineing that's causing the variables to get
Alex> optimised away???
No. GCC can make variables go away without any inlining. And even if
a variable isn't optimized away completely, it can become "dead" at
some point (when it is not needed in the rest of the function). When
that happens, the register gets reused but GDB doesn't necessarily
know that. So you can still see the variable but the values it
appears to have are wrong because that register now contains something
else.
paul
More information about the Gdb
mailing list