This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Designs for better debug info in GCC


On Nov 23, 2007, "Frank Ch. Eigler" <fche@redhat.com> wrote:

>> > 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
                                                    ^avoided?
>> > should be minimized. [...]

Richard Guenther replied:

>> As it is (without serious overhead) impossible to do both,

Is it?  

>> you either have to live with possibly incorrect but elaborate or
>> incomplete but correct debug information for optimized code.

You have proof of that?

>> Choose one ;)

As in, command line options?  Or are we going to make a choice and
impose that on all our users, as if it fit all?

Frank followed up:

>> 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.

It's not just superfluous or extra.  Your approach actively regresses
debug information for some cases, while it's arguable whether it
actually improves others.

> That ("world-domination") seems an overly unkind characterization

+1

It would be like myself pointing out that, for every problem, there's
a solution that's simple, elegant and wrong ;-)

Given the problems with sequential live ranges being made parallel and
conflicting, values subject to conditions being made inconditional,
and overwritten values remaining noted as live, I wouldn't think the
characterization above would be unfair, but I'd managed to resist it
so far.

I don't think pulling the blanket such that it covers your face while
it uncovers your feet is the way to go.  It's even worse, because
then, with your face covered, you won't even see that your feet are
uncovered ;-)

Regressions are bad, and this proposed approach guarantees
regressions, while it might fix a few trivial cases.  This is not
enough for me.  I'm not just hacking up a quick fix for a
poorly-worded problem.  I'm doing actual software engineering here,
trying to get GCC to comply with existing debug info standards.

> It does not seem to me like there is
> substantial disagreement over the ideal of correct

Unfortunately, that is indeed up for debate.  There are even those who
dispute that there's any correctness issue involved.  Most other
approaches are actually overreaching in completeness, trading
correctness for more information, as if more unreliable information
was any better than no information at all.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]