This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should GCC tell GDB about its optimizations?
martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) writes:
> > 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)
- you can't "list" a inlined function. That can be rather confusing.
-Andi
--
This is like TV. I don't like TV.