This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Should GCC tell GDB about its optimizations?
- To: tjw at omnigroup dot com
- Subject: Re: Should GCC tell GDB about its optimizations?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 4 Mar 2000 10:42:49 +0100
- CC: shebs at apple dot com, gdb at sourceware dot cygnus dot com, gcc at gcc dot gnu dot org
- References: <0003031702.AA550283@electabuzz>
> What sort of squirrelly behavior are you talking about exactly? If it is
> just the typical problem where GCC reuses register's and stack locations
> when variables lifetime's are over, this would seem like a gdb problem, not
> a GCC problem.
I don't know what problem Stan is talking about, but I know there are
other problems:
- If a function is inlined, single-stepping will get you into the
function source code. However, it won't appear in the backtrace, and
invoking 'fin' will do the wrong thing.
- Again, in inlining, the compiler will not put information about
function parameters into the stabs if the parameters are
optimized-away.
- The same holds for local variables - if they are eliminated, gdb
won't know about them - they just don't exist in the debug
information (or, in the code, for that matter)
Regards,
Martin