aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2009-06-08 07:46:02 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2009-06-08 07:46:02 +0000
commit2153915d0ab419d1e0b67f9e0e302368820d76f6 (patch)
tree4b2c9076dc8fb9da65d110bb248b0fd2c5b7f0bc /gcc/doc
parentcdb884681d2b2f835e4457d84648b82d55e71262 (diff)
downloadgcc-2153915d0ab419d1e0b67f9e0e302368820d76f6.zip
gcc-2153915d0ab419d1e0b67f9e0e302368820d76f6.tar.gz
gcc-2153915d0ab419d1e0b67f9e0e302368820d76f6.tar.bz2
common.opt (fcompare-debug=, [...]): New.
gcc/ChangeLog: * common.opt (fcompare-debug=, fcompare-debug-second): New. (fdump-final-insns=, gtoggle): New. * doc/invoke.texi: Document them. * final.c (rest_of_clean_state): Dump final insn stream. * gcc.c (invoke_as): Hook in -fcompare-debug. (static_spec_functions): Add compare-debug-dump-opt, compare-debug-self-opt and compare-debug-auxbase-opt. (compare_debug, compare_debug_second, compare_debug_opt): New. (switches_debug_check, n_switches_debug_check): New. (debug_auxbase_opt, debug_check_temp_file): New. (process_command): Handle -fno-compare-debug, -fcompare-debug and -fcompare-debug=*. (do_self_spec): Handle arguments after switches. (do_spec_1): Add .gk extension to temp file basenames for compare. (check_live_switch): Take SWITCH_IGNORE into account, and earlier. (cc1_options): Use it instead of normal auxbase computation for the second compare-debug compilation. (compare_files): New. (main): Set up and implement compare debug mode. (compare_debug_dump_opt_spec_function): New. (compare_debug_self_opt_spec_function): New. (compare_debug_auxbase_opt_spec_function): New. * toplev.c (process_options): Handle flag_gtoggle, flag_dump_final_insns. * coverage.c (coverage_begin_output): Don't overwrite .gcno file during -fcompare-debug-second compilation. gcc/cp/ChangeLog: * repo.c (get_base_filename): Use aux_base_name rather than alternate temporary file during second compare debug compilation. (finish_repo): Skip during -fcompare-debug-second. gcc/ada/ChangeLog: * lib-writ.adb (flag_compare_debug): Import. (Write_ALI): Skip during -fcompare-debug-second. gcc/fortran/ChangeLog: * options.c (gfc_post_options): Disable dump_parse_tree during -fcompare-debug-second. gcc/objc/ChangeLog: * objc-act.c (objc_init): Skip print_struct_values during -fcompare-debug-second. From-SVN: r148271
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi59
1 files changed, 58 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c669c21..99aa2ca 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -302,13 +302,15 @@ Objective-C and Objective-C++ Dialects}.
-fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
-ftree-vectorizer-verbose=@var{n} @gol
-fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
+-fdump-final-insns=@var{file} @gol
+-fcompare-debug@r{[}=@var{opts}@r{]} -fcompare-debug-second @gol
-feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
-feliminate-unused-debug-symbols -femit-class-debug-always @gol
-fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
-fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
-ftest-coverage -ftime-report -fvar-tracking @gol
--g -g@var{level} -gcoff -gdwarf-2 @gol
+-g -g@var{level} -gtoggle -gcoff -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
-fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
-fdebug-prefix-map=@var{old}=@var{new} @gol
@@ -4384,6 +4386,61 @@ debug format is long obsolete, but the option cannot be changed now.
Instead use an additional @option{-g@var{level}} option to change the
debug level for DWARF2.
+@item -gtoggle
+@opindex gtoggle
+Turn off generation of debug info, if leaving out this option would have
+generated it, or turn it on at level 2 otherwise. The position of this
+argument in the command line does not matter, it takes effect after all
+other options are processed, and it does so only once, no matter how
+many times it is given. This is mainly intended to be used with
+@option{-fcompare-debug}.
+
+@item -fdump-final-insns=@var{file}
+@opindex fdump-final-insns=
+Dump the final internal representation (RTL) to @var{file}.
+
+@item -fcompare-debug@r{[}=@var{opts}@r{]}
+@opindex fcompare-debug
+@opindex fno-compare-debug
+If no error occurs during compilation, run the compiler a second time,
+adding @var{opts} and @option{-fcompare-debug-second} to the arguments
+passed to the second compilation. Dump the final internal
+representation in both compilations, and print an error if they differ.
+
+If the equal sign is omitted, the default @option{-gtoggle} is used.
+
+The environment variable @env{GCC_COMPARE_DEBUG}, if defined, non-empty
+and nonzero, implicitly enables @option{-fcompare-debug}. If
+@env{GCC_COMPARE_DEBUG} is defined to a string starting with a dash,
+then it is used for @var{opts}, otherwise the default @option{-gtoggle}
+is used.
+
+@option{-fcompare-debug=}, with the equal sign but without @var{opts},
+is equivalent to @option{-fno-compare-debug}, which disables the dumping
+of the final representation and the second compilation, preventing even
+@env{GCC_COMPARE_DEBUG} from taking effect.
+
+To verify full coverage during @option{-fcompare-debug} testing, set
+@env{GCC_COMPARE_DEBUG} to say @samp{-fcompare-debug-not-overridden},
+which GCC will reject as an invalid option in any actual compilation
+(rather than preprocessing, assembly or linking). To get just a
+warning, setting @env{GCC_COMPARE_DEBUG} to @samp{-w%n-fcompare-debug
+not overridden} will do.
+
+@item -fcompare-debug-second
+@opindex fcompare-debug-second
+This option is implicitly passed to the compiler for the second
+compilation requested by @option{-fcompare-debug}, along with options to
+silence warnings, and omitting other options that would cause
+side-effect compiler outputs to files or to the standard output. Dump
+files and preserved temporary files are renamed so as to contain the
+@code{.gk} additional extension during the second compilation, to avoid
+overwriting those generated by the first.
+
+When this option is passed to the compiler driver, it causes the
+@emph{first} compilation to be skipped, which makes it useful for little
+other than debugging the compiler proper.
+
@item -feliminate-dwarf2-dups
@opindex feliminate-dwarf2-dups
Compress DWARF2 debugging information by eliminating duplicated