[Dwarf-Discuss] Does gcc optimization impacts retrieving Dwarf information?

Mark Wielaard mjw@redhat.com
Thu Nov 19 13:55:26 GMT 2009

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?

See the following options from:

        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. 
        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 Dwarf-discuss mailing list