This is the mail archive of the
mailing list for the GCC project.
Re: Designs for better debug info in GCC
Andrew Pinski wrote:
I have to ask, do you want an optimizing compiler or one which
generates full debugging information????
I would like modes which do the following
a) reasonable amount of optimization that does not intefere too much
with debugging. The old GCC 3 -O1 was a close approximation to this
(certainly a closer approximation than the current -O1).
b) all possible optimziations even if debuggability is compromised
That's a perfectly reasonable request, and we used to be pretty
close to having it, but now -O1 has really degraded as a solution
to a). Yes, it's somewhat more efficient, but I suspect that the
small minority of those interested in the last bit of performance
are using -O2 anyway, so I doubt many people get much benefit from
the improved performance of -O1 code. On the other hand lots of
people are negatively affected by the degrading of debugging in
Because there are trade off
here really. The reason behind the extra inlining is because it
improves code generation. I don't know about you but in some area of
coding, they need the extra speed/size reductions that inlining of non
user marked functions. I have plenty of code which needs the speed
help that the extra inling helps (remember some developers don't want
to change the code that much to have the optimizing compiler do its
Obviously you don't want a lot of inlining unless the debugger can
handle inlining properly if your interest is in being able to debug!
Remember dwarf3 is not really a standards about meta-information, it
just mentions how it represented if it exists.
But consumers want a debugger that works, without having to take the
hit of huge volumes of code at -O0