On Wed, Nov 07, 2007 at 02:56:24PM -0800, Ian Lance Taylor wrote: > At one time, gcc actually provided better debugging of optimized code > than any other compiler, though I don't know if that is still true. > Optimized gcc code is still debuggable today. I do it all the time. > (For me poor support for debugging C++ is a much bigger issue, though > I think that is an issue more with gdb than with gcc.)
We're working on both of these on the GDB side. > gcc's users are definitely calling for a faster compiler. Are they > calling for better debuggability of optimized code? In my experience, yes. CodeSourcery has work currently being contributed to GDB that makes this quite a lot better; we also occasionally have customers ask us about further improvements. And I file bugs about this from time to time, most of which are still open. > As I understand your proposal, it materializes variables which were > otherwise omitted from the generated program. It doesn't address the > other issues with debugging optimized code, like bouncing around > between program lines. Is that correct? What else does your proposal > do? I've been thinking about the bouncing problem quite a bit lately. I have some rough ideas, but I won't draw out this thread by sharing :-) -- Daniel Jacobowitz CodeSourcery