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?
- To: shebs at apple dot com
- Subject: Re: Should GCC tell GDB about its optimizations?
- From: "Timothy J. Wood" <tjw at omnigroup dot com>
- Date: Fri, 03 Mar 2000 17:02:55 -0800
- Cc: gdb at sourceware dot cygnus dot com, gcc at gcc dot gnu dot org
From: Stan Shebs <shebs@apple.com>
>But today, the result is just lame; hackers
t>rying to debug get lots of squirrelly behavior from GDB.
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. gdb should be able to look at the debugging info and notice
that the variable you are trying to print is not currently live. It could
then print out a message that says so, rather than printing out whatever
random crud happens to be at the place of the variable's death.
Of course, I only know about the stabs format (and only as used on MacOS X
Server/MacOS X) -- this format seems to provide enough information to
implement this behavior in gdb. I would assume that other debug info
formats would have the same information.
Is there some other behavior that isn't covered by the above?
-tim