[Dwarf-Discuss] Does gcc optimization impacts retriving Dwarf information?
Frank Ch. Eigler
fche@redhat.com
Thu May 28 14:59:01 GMT 2009
Hi -
On Thu, May 28, 2009 at 02:57:08AM -0700, Michael Eager wrote:
> [...]
>> This problem (unable to retrieve variable values) raises two questions:
>> 1. Does it mean that compiling with -O2 option removes some of the
>> information needed by DWARF library functions?
>
> [...] DIEs for variables which do not have DW_AT_location
> attributes do not have physical locations. Your crash dump utility
> should not attempt to find the locations or print the values for
> these variables.
That's all true in the abstract, but modern gcc has been known to
abscond with variable location data even for values that are
live/recomputable. This is the main reason why the VTA (and
debuglocus and other) gcc projects are under way -- to represent the
maximum possible conceptual data, despite -O2 etc.
- FChE
More information about the Dwarf-discuss
mailing list