diff options
author | mithro <mithro@mithis.com> | 2014-09-24 22:56:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-25 05:57:21 +0000 |
commit | 9f7cb7480b85d868fb3420b960018d9137c9954a (patch) | |
tree | 7fb0a3db5d208fa7741cd10b5be9ea3963e564a1 /build | |
parent | e9273647058dda9eb46331ec7f73c424d7dfbbbd (diff) | |
download | chromium_src-9f7cb7480b85d868fb3420b960018d9137c9954a.zip chromium_src-9f7cb7480b85d868fb3420b960018d9137c9954a.tar.gz chromium_src-9f7cb7480b85d868fb3420b960018d9137c9954a.tar.bz2 |
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}
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index 6f4223b..93576b8 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -3569,6 +3569,11 @@ '-gdwarf-4', ], 'conditions' : [ + ['fastbuild==0', { + 'cflags': [ + '-fvar-tracking-assignments', '-fvar-tracking', + ], + }], ['OS=="android"', { 'ldflags': [ # Warn in case of text relocations. |