📄 debugging-options.html
字号:
<dd>Dump after the third if conversion, to <code></code><var>file</var><code>.30.ce3</code>. <br><dt><code>f</code> <dd>Dump after control and data flow analysis, to <code></code><var>file</var><code>.11.cfg</code>. Also dump after life analysis, to <code></code><var>file</var><code>.19.life</code>. <br><dt><code>F</code> <dd>Dump after purging <code>ADDRESSOF</code> codes, to <code></code><var>file</var><code>.07.addressof</code>. <br><dt><code>g</code> <dd>Dump after global register allocation, to <code></code><var>file</var><code>.25.greg</code>. <br><dt><code>G</code> <dd>Dump after GCSE, to <code></code><var>file</var><code>.08.gcse</code>. Also dump after jump bypassing and control flow optimizations, to<code></code><var>file</var><code>.10.bypass</code>. <br><dt><code>h</code> <dd>Dump after finalization of EH handling code, to <code></code><var>file</var><code>.03.eh</code>. <br><dt><code>i</code> <dd>Dump after sibling call optimizations, to <code></code><var>file</var><code>.02.sibling</code>. <br><dt><code>j</code> <dd>Dump after the first jump optimization, to <code></code><var>file</var><code>.04.jump</code>. <br><dt><code>k</code> <dd>Dump after conversion from registers to stack, to <code></code><var>file</var><code>.34.stack</code>. <br><dt><code>l</code> <dd>Dump after local register allocation, to <code></code><var>file</var><code>.24.lreg</code>. <br><dt><code>L</code> <dd>Dump after loop optimization passes, to <code></code><var>file</var><code>.09.loop</code> and<code></code><var>file</var><code>.16.loop2</code>. <br><dt><code>M</code> <dd>Dump after performing the machine dependent reorganization pass, to<code></code><var>file</var><code>.35.mach</code>. <br><dt><code>n</code> <dd>Dump after register renumbering, to <code></code><var>file</var><code>.29.rnreg</code>. <br><dt><code>N</code> <dd>Dump after the register move pass, to <code></code><var>file</var><code>.22.regmove</code>. <br><dt><code>o</code> <dd>Dump after post-reload optimizations, to <code></code><var>file</var><code>.26.postreload</code>. <br><dt><code>r</code> <dd>Dump after RTL generation, to <code></code><var>file</var><code>.01.rtl</code>. <br><dt><code>R</code> <dd>Dump after the second scheduling pass, to <code></code><var>file</var><code>.33.sched2</code>. <br><dt><code>s</code> <dd>Dump after CSE (including the jump optimization that sometimes followsCSE), to <code></code><var>file</var><code>.06.cse</code>. <br><dt><code>S</code> <dd>Dump after the first scheduling pass, to <code></code><var>file</var><code>.23.sched</code>. <br><dt><code>t</code> <dd>Dump after the second CSE pass (including the jump optimization thatsometimes follows CSE), to <code></code><var>file</var><code>.18.cse2</code>. <br><dt><code>T</code> <dd>Dump after running tracer, to <code></code><var>file</var><code>.15.tracer</code>. <br><dt><code>u</code> <dd>Dump after null pointer elimination pass to <code></code><var>file</var><code>.05.null</code>. <br><dt><code>U</code> <dd>Dump callgraph and unit-at-a-time optimization <code></code><var>file</var><code>.00.unit</code>. <br><dt><code>V</code> <dd>Dump after the value profile transformations, to <code></code><var>file</var><code>.13.vpt</code>. Also dump after variable tracking, to <code></code><var>file</var><code>.35.vartrack</code>. <br><dt><code>w</code> <dd>Dump after the second flow pass, to <code></code><var>file</var><code>.27.flow2</code>. <br><dt><code>z</code> <dd>Dump after the peephole pass, to <code></code><var>file</var><code>.28.peephole2</code>. <br><dt><code>Z</code> <dd>Dump after constructing the web, to <code></code><var>file</var><code>.17.web</code>. <br><dt><code>a</code> <dd>Produce all the dumps listed above. <br><dt><code>H</code> <dd>Produce a core dump whenever an error occurs. <br><dt><code>m</code> <dd>Print statistics on memory usage, at the end of the run, tostandard error. <br><dt><code>p</code> <dd>Annotate the assembler output with a comment indicating whichpattern and alternative was used. The length of each instruction isalso printed. <br><dt><code>P</code> <dd>Dump the RTL in the assembler output as a comment before each instruction. Also turns on <code>-dp</code> annotation. <br><dt><code>v</code> <dd>For each of the other indicated dump files (except for<code></code><var>file</var><code>.01.rtl</code>), dump a representation of the control flow graphsuitable for viewing with VCG to <code></code><var>file</var><code>.</code><var>pass</var><code>.vcg</code>. <br><dt><code>x</code> <dd>Just generate RTL for a function instead of compiling it. Usually usedwith <code>r</code>. <br><dt><code>y</code> <dd>Dump debugging information during parsing, to standard error. </dl> <br><dt><code>-fdump-unnumbered</code> <dd>When doing debugging dumps (see <code>-d</code> option above), suppress instructionnumbers and line number note output. This makes it more feasible touse diff on debugging dumps for compiler invocations with differentoptions, in particular with and without <code>-g</code>. <br><dt><code>-fdump-translation-unit </code>(C and C++ only)<code></code> <dd><dt><code>-fdump-translation-unit-</code><var>options</var><code> </code>(C and C++ only)<code></code> <dd>Dump a representation of the tree structure for the entire translationunit to a file. The file name is made by appending <code>.tu</code> to thesource file name. If the <code>-</code><var>options</var><code></code> form is used, <var>options</var>controls the details of the dump as described for the<code>-fdump-tree</code> options. <br><dt><code>-fdump-class-hierarchy </code>(C++ only)<code></code> <dd><dt><code>-fdump-class-hierarchy-</code><var>options</var><code> </code>(C++ only)<code></code> <dd>Dump a representation of each class's hierarchy and virtual functiontable layout to a file. The file name is made by appending <code>.class</code>to the source file name. If the <code>-</code><var>options</var><code></code> form is used,<var>options</var> controls the details of the dump as described for the<code>-fdump-tree</code> options. <br><dt><code>-fdump-tree-</code><var>switch</var><code> </code>(C++ only)<code></code> <dd><dt><code>-fdump-tree-</code><var>switch</var><code>-</code><var>options</var><code> </code>(C++ only)<code></code> <dd>Control the dumping at various stages of processing the intermediatelanguage tree to a file. The file name is generated by appending a switchspecific suffix to the source file name. If the <code>-</code><var>options</var><code></code>form is used, <var>options</var> is a list of <code>-</code> separated options thatcontrol the details of the dump. Not all options are applicable to alldumps, those which are not meaningful will be ignored. The followingoptions are available <dl><dt><code>address</code> <dd>Print the address of each node. Usually this is not meaningful as itchanges according to the environment and source file. Its primary useis for tying up a dump file with a debug environment. <br><dt><code>slim</code> <dd>Inhibit dumping of members of a scope or body of a function merelybecause that scope has been reached. Only dump such items when theyare directly reachable by some other path. <br><dt><code>all</code> <dd>Turn on all options. </dl> <p>The following tree dumps are possible: <dl><dt><code>original</code> <dd>Dump before any tree based optimization, to <code></code><var>file</var><code>.original</code>. <br><dt><code>optimized</code> <dd>Dump after all tree based optimization, to <code></code><var>file</var><code>.optimized</code>. <br><dt><code>inlined</code> <dd>Dump after function inlining, to <code></code><var>file</var><code>.inlined</code>. </dl> <br><dt><code>-frandom-seed=</code><var>string</var><code></code> <dd>This option provides a seed that GCC uses when it would otherwise userandom numbers. It is used to generate certain symbol namesthat have to be different in every compiled file. It is also used toplace unique stamps in coverage data files and the object files thatproduce them. You can use the <code>-frandom-seed</code> option to producereproducibly identical object files. <p>The <var>string</var> should be different for every file you compile. <br><dt><code>-fsched-verbose=</code><var>n</var><code></code> <dd>On targets that use instruction scheduling, this option controls theamount of debugging output the scheduler prints. This information iswritten to standard error, unless <code>-dS</code> or <code>-dR</code> isspecified, in which case it is output to the usual dumplisting file, <code>.sched</code> or <code>.sched2</code> respectively. Howeverfor <var>n</var> greater than nine, the output is always printed to standarderror. <p>For <var>n</var> greater than zero, <code>-fsched-verbose</code> outputs thesame information as <code>-dRS</code>. For <var>n</var> greater than one, italso output basic block probabilities, detailed ready list informationand unit/insn info. For <var>n</var> greater than two, it includes RTLat abort point, control-flow and regions info. And for <var>n</var> overfour, <code>-fsched-verbose</code> also includes dependence info. <br><dt><code>-save-temps</code> <dd>Store the usual "temporary" intermediate files permanently; place themin the current directory and name them based on the source file. Thus,compiling <code>foo.c</code> with <code>-c -save-temps</code> would produce files<code>foo.i</code> and <code>foo.s</code>, as well as <code>foo.o</code>. This creates apreprocessed <code>foo.i</code> output file even though the compiler nownormally uses an integrated preprocessor. <br><dt><code>-time</code> <dd>Report the CPU time taken by each subprocess in the compilationsequence. For C source files, this is the compiler proper and assembler(plus the linker if linking is done). The output looks like this: <pre class="smallexample"> # cc1 0.12 0.01 # as 0.00 0.01 </pre> <p>The first number on each line is the "user time," that is time spentexecuting the program itself. The second number is "system time,"time spent executing operating system routines on behalf of the program. Both numbers are in seconds. <br><dt><code>-fvar-tracking</code> <dd>Run variable tracking pass. It computes where variables are stored at eachposition in code. Better debugging information is then generated(if the debugging information format supports this information). <p>It is enabled by default when compiling with optimization (<code>-Os</code>,<code>-O</code>, <code>-O2</code>, ...), debugging information (<code>-g</code>) andthe debug info format supports it. <br><dt><code>-print-file-name=</code><var>library</var><code></code> <dd>Print the full absolute name of the library file <var>library</var> thatwould be used when linking--and don't do anything else. With thisoption, GCC does not compile or link anything; it just prints thefile name. <br><dt><code>-print-multi-directory</code> <dd>Print the directory name corresponding to the multilib selected by anyother switches present in the command line. This directory is supposedto exist in <code>GCC_EXEC_PREFIX</code>. <br><dt><code>-print-multi-lib</code> <dd>Print the mapping from multilib directory names to compiler switchesthat enable them. The directory name is separated from the switches by<code>;</code>, and each switch starts with an <code>@</code> instead of the<code>-</code>, without spaces between multiple switches. This is supposed toease shell-processing. <br><dt><code>-print-prog-name=</code><var>program</var><code></code> <dd>Like <code>-print-file-name</code>, but searches for a program such as <code>cpp</code>. <br><dt><code>-print-libgcc-file-name</code> <dd>Same as <code>-print-file-name=libgcc.a</code>. <p>This is useful when you use <code>-nostdlib</code> or <code>-nodefaultlibs</code>but you do want to link with <code>libgcc.a</code>. You can do <pre class="smallexample"> gcc -nostdlib <var>files</var>... `gcc -print-libgcc-file-name` </pre> <br><dt><code>-print-search-dirs</code> <dd>Print the name of the configured installation directory and a list ofprogram and library directories <code>gcc</code> will search--and don't do anything else. <p>This is useful when <code>gcc</code> prints the error message<code>installation problem, cannot exec cpp0: No such file or directory</code>. To resolve this you either need to put <code>cpp0</code> and the other compilercomponents where <code>gcc</code> expects to find them, or you can set the environmentvariable <code>GCC_EXEC_PREFIX</code> to the directory where you installed them. Don't forget the trailing '/'. See <a href="Environment-Variables.html#Environment%20Variables">Environment Variables</a>. <br><dt><code>-dumpmachine</code> <dd>Print the compiler's target machine (for example,<code>i686-pc-linux-gnu</code>)--and don't do anything else. <br><dt><code>-dumpversion</code> <dd>Print the compiler version (for example, <code>3.0</code>)--and don't doanything else. <br><dt><code>-dumpspecs</code> <dd>Print the compiler's built-in specs--and don't do anything else. (Thisis used when GCC itself is being built.) See <a href="Spec-Files.html#Spec%20Files">Spec Files</a>. <br><dt><code>-feliminate-unused-debug-types</code> <dd>Normally, when producing DWARF2 output, GCC will emit debugginginformation for all types declared in a compilationunit, regardless of whether or not they are actually usedin that compilation unit. Sometimes this is useful, such asif, in the debugger, you want to cast a value to a type that isnot actually used in your program (but is declared). More often,however, this results in a significant amount of wasted space. With this option, GCC will avoid producing debug symbol outputfor types that are nowhere used in the source file being compiled. </dl> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -