[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Contributing LLVM.org patches to gud.el
From: |
Eli Zaretskii |
Subject: |
Re: Contributing LLVM.org patches to gud.el |
Date: |
Thu, 12 Feb 2015 18:26:01 +0200 |
> Date: Wed, 11 Feb 2015 18:07:42 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
>
> > From: "Stephen J. Turnbull" <address@hidden>
> > Cc: David Kastrup <address@hidden>,
> > Eli Zaretskii <address@hidden>,
> > address@hidden
> > Date: Wed, 11 Feb 2015 22:22:24 +0900
> >
> > Eli mentioned DWARF 2. The manual for GCC 4.8.4 says:
> >
> > -g
> > Produce debugging information in the operating system's native format
> > (stabs, COFF, XCOFF, or DWARF 2). GDB can work with this debugging
> > information.
> >
> > Later there is an option for specifying the version of DWARF, which
> > cautions that use of DWARF 4 "may require gdb 7 and
> > -fvar-tracking-assignments". I'll have to try that.
AFAIU, -fvar-tracking-assignments is automatically turned on when
compiling an optimized program. The GCC manual says:
-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 are created and maintained, but discarded at
the end.
The part about -fvar-tracking-assignments is confusing, but this
discussion seems to clarify that:
https://gcc.gnu.org/ml/gcc-help/2015-01/msg00152.html
https://gcc.gnu.org/ml/gcc-help/2015-01/msg00155.html
My take of this is that if you have a recent enough GCC and GDB, you
are already using this feature in optimized programs, and any
variables that are still announced as "<optimized out>" are those
which this feature is not (yet) good enough to fix.
- Re: Contributing LLVM.org patches to gud.el, (continued)
- Re: Contributing LLVM.org patches to gud.el, David Kastrup, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, David Kastrup, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, Stephen J. Turnbull, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, Daniel Colascione, 2015/02/10
- Re: Contributing LLVM.org patches to gud.el, David Kastrup, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Daniel Colascione, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Stephen J. Turnbull, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el,
Eli Zaretskii <=
- Re: Contributing LLVM.org patches to gud.el, Daniel Colascione, 2015/02/12
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/12
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Richard Stallman, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, Stephen J. Turnbull, 2015/02/11
- Re: Contributing LLVM.org patches to gud.el, David Kastrup, 2015/02/12
- Re: Contributing LLVM.org patches to gud.el, Stephen J. Turnbull, 2015/02/12
- Re: Contributing LLVM.org patches to gud.el, Eli Zaretskii, 2015/02/12