diff options
author | Tom Tromey <tromey@redhat.com> | 2011-10-17 09:59:40 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-10-17 11:59:40 +0200 |
commit | 847e697a240e6d30335335c62084743978fa2084 (patch) | |
tree | 1df29dda9c3f6fb6e559fa82140695ea5b6130d1 /gcc/doc | |
parent | 07a0b324eb7e353146340f00db380c6d92851fc9 (diff) | |
download | gcc-847e697a240e6d30335335c62084743978fa2084.zip gcc-847e697a240e6d30335335c62084743978fa2084.tar.gz gcc-847e697a240e6d30335335c62084743978fa2084.tar.bz2 |
Support -fdebug-cpp option
This patch adds -fdebug-cpp option. When used with -E this dumps the
relevant macro map before every single token. This clutters the output
a lot but has proved to be invaluable in tracking some bugs during the
development of the virtual location support.
Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
From-SVN: r180084
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/cppopts.texi | 13 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index b225236..ef3a0b2 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -583,6 +583,19 @@ correct column numbers in warnings or errors, even if tabs appear on the line. If the value is less than 1 or greater than 100, the option is ignored. The default is 8. +@item -fdebug-cpp +@opindex fdebug-cpp +This option is only useful for debugging GCC. When used with +@option{-E}, dumps debugging information about location maps. Every +token in the output is preceded by the dump of the map its location +belongs to. The dump of the map holding the location of a token would +be: +@quotation +@{@samp{P}:@file{/file/path};@samp{F}:@file{/includer/path};@samp{L}:@var{line_num};@samp{C}:@var{col_num};@samp{S}:@var{system_header_p};@samp{M}:@var{map_address};@samp{E}:@var{macro_expansion_p},@samp{loc}:@var{location}@} +@end quotation + +When used without @option{-E}, this option has no effect. + @item -ftrack-macro-expansion@r{[}=@var{level}@r{]} @opindex ftrack-macro-expansion Track locations of tokens across macro expansions. This allows the diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b2c26ed..3b71cb1 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -429,7 +429,7 @@ Objective-C and Objective-C++ Dialects}. -iwithprefixbefore @var{dir} -isystem @var{dir} @gol -imultilib @var{dir} -isysroot @var{dir} @gol -M -MM -MF -MG -MP -MQ -MT -nostdinc @gol --P -ftrack-macro-expansion -fworking-directory @gol +-P -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol -remap -trigraphs -undef -U@var{macro} @gol -Wp,@var{option} -Xpreprocessor @var{option}} |