[Dwarf-Discuss] Does gcc optimization impacts retrieving Dwarf information?
Richard Guenther
richard.guenther@gmail.com
Thu Nov 19 14:02:00 GMT 2009
On Thu, Nov 19, 2009 at 2:55 PM, Mark Wielaard <mjw@redhat.com> wrote:
> On Thu, 2009-11-19 at 19:15 +0530, M. Mohan Kumar wrote:
>> On 11/19/2009 04:30 PM, Mark Wielaard wrote:
>> > On Wed, 2009-11-18 at 18:19 +0530, M. Mohan Kumar wrote:
>> >> Are VTA patches part of mainline gcc now? If not, where could we get the
>> >> VTA patches?
>> >
>> > The VTA implementation is in mainline gcc now. There are also some
>> > backports to gcc 4.4, like the gcc that Fedora 12 ships with.
>>
>> Thank you very much for the info. Is there any option needs to be passed
>> to gcc to enable this VTA feature?
It is enabled by default when -g is specified.
Richard.
> See the following options from:
> http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options
>
> -fvar-tracking
> Run variable tracking pass. It computes where variables are
> stored at each position in code. Better debugging information is
> then generated (if the debugging information format supports
> this information).
>
> It is enabled by default when compiling with optimization (-Os,
> -O, -O2, ...), debugging information (-g) and the debug info
> format supports it.
>
>
> -fvar-tracking-assignments
> Annotate assignments to user variables early in the compilation
> and attempt to carry the annotations over throughout the
> compilation all the way to the end, in an attempt to improve
> debug information while optimizing. Use of -gdwarf-4 is
> recommended along with it.
>
> It can be enabled even if var-tracking is disabled, in which
> case annotations will be created and maintained, but discarded
> at the end.
>
>
>
More information about the Gcc
mailing list