how to examine data with compiler optimization option set?
Frank Ch. Eigler
fche@redhat.com
Wed Sep 3 03:06:00 GMT 2008
Michael Snyder <msnyder@vmware.com> writes:
> [...]
> I don't think there is any possibility whatsoever of
> somehow generating location codes for the variables in
> the example.
>
> Those values are simply not kept anywhere. GCC will replace
> them all with the constant, "3".
You might be surprised. Some RH engineers are working along these
lines. Being able to debug (<=> probe/trace) optimized code is
becoming more and more important, and gcc is slowly getting into the
mood to help.
- FChE
More information about the Gdb
mailing list