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


Alexandre Oliva wrote:
On Nov 8, 2007, Robert Dewar <dewar@adacore.com> wrote:

My general feelings on this subject:

1. I don't think we should care much about the ability to
*SET* values of variables in optimized code.

Indeed. We should care about correctness of debug information, and then this ability will come naturally ;-)

Not really, there are optimizations that will still allow reading the value of a variable, but not setting it, and I think it is just fine to do these optimizations. For instance if we have

b = a;

the optimizer may not do a copy, it may simply know that
b and a values are in the same place. This does not stand
in the way of reading the value, but it does make it
impossible to write a or b.

Similarly, if the optimizer does test replacement, and
knows that the value of a can be obtained by evaluating
some expression, the debugger can read the value, but
may not be able to set it.

3. The quality of code at -O0 is really terrible

That's a feature, no?





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