[Can we pick just gcc@ or just gcc-patches@ please?] On Thu, Nov 08, 2007 at 05:11:24PM -0800, Joe Buck wrote: > Debugging would be just as easy and natural if -O0 only made sure that > values of variables are written out to memory at positions where the > user can set a breakpoint; the code doesn't need to preserve every > operation exactly as written, or read variables in from memory that > are already in registers. Kind of an -O0.5 would be more desirable > than what we have now.
Careful. Eliminating reads from memory messes up debugger modification of variables, unless you can explain to the debugger that the variable is currently in both locations - this has been discussed but AFAIK there is no representation for it yet. Changing the memory location won't change the next operation that thinks it's in the register. Changing the register will be lost later. -- Daniel Jacobowitz CodeSourcery