Commit 9f7cb748 authored by mithro's avatar mithro Committed by Commit bot

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}
parent e9273647
......@@ -3569,6 +3569,11 @@
'-gdwarf-4',
],
'conditions' : [
['fastbuild==0', {
'cflags': [
'-fvar-tracking-assignments', '-fvar-tracking',
],
}],
['OS=="android"', {
'ldflags': [
# Warn in case of text relocations.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment