Enable extended debugging symbols to including better tracking.
Adding -fvar-tracking-assignments and -fvar-tracking to improve tracking of variables and assignments. While mostly useful when compiling with optimisations on (-O flags), it does help with clang (and later gccs) which are doing many optimisations all the time. (It does sometimes default to on when compiling with -O flags.) From http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html > -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. Review URL: https://codereview.chromium.org/362183003 Cr-Commit-Position: refs/heads/master@{#296662}
Showing
Please register or sign in to comment