Designs for better debug info in GCC

Frank Ch. Eigler fche@redhat.com
Fri Nov 23 20:53:00 GMT 2007


Hi -

(BTW, sorry for reopening this old thread if people are sick & tired of it.)

> > Mark Mitchell <mark@codesourcery.com> writes:
> > > [...]
> > > That's what I'm asking.  First and foremost, I want to know what,
> > > concretely, Alexandre is trying to achieve, beyond "better debugging
> > > info for optimized code".  [...]
> >
> > It may be asking to belabour the obvious.  GCC users do not want to
> > have to compile with "-O0 -g" just to debug during development [...]
> > Developers will accept that optimized code will by its nature make
> > some of these fuzzy, but incorrect data must be and incomplete data
> > should be minimized. [...]
> 
> As it is (without serious overhead) impossible to do both, you either have
> to live with possibly incorrect but elaborate or incomplete but correct
> debug information for optimized code.  Choose one ;)

I did say "minimized", not "eliminated".  It needs to be good enough
that a semi-knowledgable person or a dumb but heuristic-laden program
that processes debugging info can nevertheless extract reliable
information.


> What we (Matz and myself) are trying to do is provide elaborate
> debug information with the chance of wrong (I'd call it superflous,
> or extra) debug information.

(I will need to reread the thread to see what this extra information
can do in terms of misleading users or tools, such as giving incorrect
variable values/locations.  I'd appreciate a link if you have one
handy.)

> Alexandre seems to aim at the world-domination solution (with the
> serious overhead in terms of implementation and verboseness).

That ("world-domination") seems an overly unkind characterization - we
could simply say he's trying an exhaustive, straining-to-be-correct
solution.

It seems to me that we will shortly see the actual impacts of both of
these approaches in terms of compiler complexity as well as any
improvements in data quality.  It does not seem to me like there is
substantial disagreement over the ideal of correct and to a lesser
extent complete information, so let's see the implementations and then
compare.

- FChE



More information about the Gcc-patches mailing list