This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gcc options for improving debugging?


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]