Debugging-Options.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): Debugging Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): Debugging Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): Debugging Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Invoking-GCC.html#Invoking-GCC" rel="up" title="Invoking GCC">
  30. <link href="Optimize-Options.html#Optimize-Options" rel="next" title="Optimize Options">
  31. <link href="Warning-Options.html#Warning-Options" rel="prev" title="Warning Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Debugging-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Optimize-Options.html#Optimize-Options" accesskey="n" rel="next">Optimize Options</a>, Previous: <a href="Warning-Options.html#Warning-Options" accesskey="p" rel="prev">Warning Options</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Options-for-Debugging-Your-Program"></a>
  69. <h3 class="section">3.9 Options for Debugging Your Program</h3>
  70. <a name="index-options_002c-debugging"></a>
  71. <a name="index-debugging-information-options"></a>
  72. <p>To tell GCC to emit extra information for use by a debugger, in almost
  73. all cases you need only to add <samp>-g</samp> to your other options.
  74. </p>
  75. <p>GCC allows you to use <samp>-g</samp> with
  76. <samp>-O</samp>. The shortcuts taken by optimized code may occasionally
  77. be surprising: some variables you declared may not exist
  78. at all; flow of control may briefly move where you did not expect it;
  79. some statements may not be executed because they compute constant
  80. results or their values are already at hand; some statements may
  81. execute in different places because they have been moved out of loops.
  82. Nevertheless it is possible to debug optimized output. This makes
  83. it reasonable to use the optimizer for programs that might have bugs.
  84. </p>
  85. <p>If you are not using some other optimization option, consider
  86. using <samp>-Og</samp> (see <a href="Optimize-Options.html#Optimize-Options">Optimize Options</a>) with <samp>-g</samp>.
  87. With no <samp>-O</samp> option at all, some compiler passes that collect
  88. information useful for debugging do not run at all, so that
  89. <samp>-Og</samp> may result in a better debugging experience.
  90. </p>
  91. <dl compact="compact">
  92. <dt><code>-g</code></dt>
  93. <dd><a name="index-g"></a>
  94. <p>Produce debugging information in the operating system&rsquo;s native format
  95. (stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging
  96. information.
  97. </p>
  98. <p>On most systems that use stabs format, <samp>-g</samp> enables use of extra
  99. debugging information that only GDB can use; this extra information
  100. makes debugging work better in GDB but probably makes other debuggers
  101. crash or
  102. refuse to read the program. If you want to control for certain whether
  103. to generate the extra information, use <samp>-gstabs+</samp>, <samp>-gstabs</samp>,
  104. <samp>-gxcoff+</samp>, <samp>-gxcoff</samp>, or <samp>-gvms</samp> (see below).
  105. </p>
  106. </dd>
  107. <dt><code>-ggdb</code></dt>
  108. <dd><a name="index-ggdb"></a>
  109. <p>Produce debugging information for use by GDB. This means to use the
  110. most expressive format available (DWARF, stabs, or the native format
  111. if neither of those are supported), including GDB extensions if at all
  112. possible.
  113. </p>
  114. </dd>
  115. <dt><code>-gdwarf</code></dt>
  116. <dt><code>-gdwarf-<var>version</var></code></dt>
  117. <dd><a name="index-gdwarf"></a>
  118. <p>Produce debugging information in DWARF format (if that is supported).
  119. The value of <var>version</var> may be either 2, 3, 4 or 5; the default version
  120. for most targets is 4. DWARF Version 5 is only experimental.
  121. </p>
  122. <p>Note that with DWARF Version 2, some ports require and always
  123. use some non-conflicting DWARF 3 extensions in the unwind tables.
  124. </p>
  125. <p>Version 4 may require GDB 7.0 and <samp>-fvar-tracking-assignments</samp>
  126. for maximum benefit.
  127. </p>
  128. <p>GCC no longer supports DWARF Version 1, which is substantially
  129. different than Version 2 and later. For historical reasons, some
  130. other DWARF-related options (including <samp>-feliminate-dwarf2-dups</samp>
  131. and <samp>-fno-dwarf2-cfi-asm</samp>) retain a reference to DWARF Version 2
  132. in their names, but apply to all currently-supported versions of DWARF.
  133. </p>
  134. </dd>
  135. <dt><code>-gstabs</code></dt>
  136. <dd><a name="index-gstabs"></a>
  137. <p>Produce debugging information in stabs format (if that is supported),
  138. without GDB extensions. This is the format used by DBX on most BSD
  139. systems. On MIPS, Alpha and System V Release 4 systems this option
  140. produces stabs debugging output that is not understood by DBX or SDB.
  141. On System V Release 4 systems this option requires the GNU assembler.
  142. </p>
  143. </dd>
  144. <dt><code>-gstabs+</code></dt>
  145. <dd><a name="index-gstabs_002b"></a>
  146. <p>Produce debugging information in stabs format (if that is supported),
  147. using GNU extensions understood only by the GNU debugger (GDB). The
  148. use of these extensions is likely to make other debuggers crash or
  149. refuse to read the program.
  150. </p>
  151. </dd>
  152. <dt><code>-gcoff</code></dt>
  153. <dd><a name="index-gcoff"></a>
  154. <p>Produce debugging information in COFF format (if that is supported).
  155. This is the format used by SDB on most System V systems prior to
  156. System V Release 4.
  157. </p>
  158. </dd>
  159. <dt><code>-gxcoff</code></dt>
  160. <dd><a name="index-gxcoff"></a>
  161. <p>Produce debugging information in XCOFF format (if that is supported).
  162. This is the format used by the DBX debugger on IBM RS/6000 systems.
  163. </p>
  164. </dd>
  165. <dt><code>-gxcoff+</code></dt>
  166. <dd><a name="index-gxcoff_002b"></a>
  167. <p>Produce debugging information in XCOFF format (if that is supported),
  168. using GNU extensions understood only by the GNU debugger (GDB). The
  169. use of these extensions is likely to make other debuggers crash or
  170. refuse to read the program, and may cause assemblers other than the GNU
  171. assembler (GAS) to fail with an error.
  172. </p>
  173. </dd>
  174. <dt><code>-gvms</code></dt>
  175. <dd><a name="index-gvms"></a>
  176. <p>Produce debugging information in Alpha/VMS debug format (if that is
  177. supported). This is the format used by DEBUG on Alpha/VMS systems.
  178. </p>
  179. </dd>
  180. <dt><code>-g<var>level</var></code></dt>
  181. <dt><code>-ggdb<var>level</var></code></dt>
  182. <dt><code>-gstabs<var>level</var></code></dt>
  183. <dt><code>-gcoff<var>level</var></code></dt>
  184. <dt><code>-gxcoff<var>level</var></code></dt>
  185. <dt><code>-gvms<var>level</var></code></dt>
  186. <dd><p>Request debugging information and also use <var>level</var> to specify how
  187. much information. The default level is 2.
  188. </p>
  189. <p>Level 0 produces no debug information at all. Thus, <samp>-g0</samp> negates
  190. <samp>-g</samp>.
  191. </p>
  192. <p>Level 1 produces minimal information, enough for making backtraces in
  193. parts of the program that you don&rsquo;t plan to debug. This includes
  194. descriptions of functions and external variables, and line number
  195. tables, but no information about local variables.
  196. </p>
  197. <p>Level 3 includes extra information, such as all the macro definitions
  198. present in the program. Some debuggers support macro expansion when
  199. you use <samp>-g3</samp>.
  200. </p>
  201. <p><samp>-gdwarf</samp> does not accept a concatenated debug level, to avoid
  202. confusion with <samp>-gdwarf-<var>level</var></samp>.
  203. Instead use an additional <samp>-g<var>level</var></samp> option to change the
  204. debug level for DWARF.
  205. </p>
  206. </dd>
  207. <dt><code>-feliminate-unused-debug-symbols</code></dt>
  208. <dd><a name="index-feliminate_002dunused_002ddebug_002dsymbols"></a>
  209. <p>Produce debugging information in stabs format (if that is supported),
  210. for only symbols that are actually used.
  211. </p>
  212. </dd>
  213. <dt><code>-femit-class-debug-always</code></dt>
  214. <dd><a name="index-femit_002dclass_002ddebug_002dalways"></a>
  215. <p>Instead of emitting debugging information for a C++ class in only one
  216. object file, emit it in all object files using the class. This option
  217. should be used only with debuggers that are unable to handle the way GCC
  218. normally emits debugging information for classes because using this
  219. option increases the size of debugging information by as much as a
  220. factor of two.
  221. </p>
  222. </dd>
  223. <dt><code>-fno-merge-debug-strings</code></dt>
  224. <dd><a name="index-fmerge_002ddebug_002dstrings"></a>
  225. <a name="index-fno_002dmerge_002ddebug_002dstrings"></a>
  226. <p>Direct the linker to not merge together strings in the debugging
  227. information that are identical in different object files. Merging is
  228. not supported by all assemblers or linkers. Merging decreases the size
  229. of the debug information in the output file at the cost of increasing
  230. link processing time. Merging is enabled by default.
  231. </p>
  232. </dd>
  233. <dt><code>-fdebug-prefix-map=<var>old</var>=<var>new</var></code></dt>
  234. <dd><a name="index-fdebug_002dprefix_002dmap"></a>
  235. <p>When compiling files in directory <samp><var>old</var></samp>, record debugging
  236. information describing them as in <samp><var>new</var></samp> instead.
  237. </p>
  238. </dd>
  239. <dt><code>-fvar-tracking</code></dt>
  240. <dd><a name="index-fvar_002dtracking"></a>
  241. <p>Run variable tracking pass. It computes where variables are stored at each
  242. position in code. Better debugging information is then generated
  243. (if the debugging information format supports this information).
  244. </p>
  245. <p>It is enabled by default when compiling with optimization (<samp>-Os</samp>,
  246. <samp>-O</samp>, <samp>-O2</samp>, &hellip;), debugging information (<samp>-g</samp>) and
  247. the debug info format supports it.
  248. </p>
  249. </dd>
  250. <dt><code>-fvar-tracking-assignments</code></dt>
  251. <dd><a name="index-fvar_002dtracking_002dassignments"></a>
  252. <a name="index-fno_002dvar_002dtracking_002dassignments"></a>
  253. <p>Annotate assignments to user variables early in the compilation and
  254. attempt to carry the annotations over throughout the compilation all the
  255. way to the end, in an attempt to improve debug information while
  256. optimizing. Use of <samp>-gdwarf-4</samp> is recommended along with it.
  257. </p>
  258. <p>It can be enabled even if var-tracking is disabled, in which case
  259. annotations are created and maintained, but discarded at the end.
  260. By default, this flag is enabled together with <samp>-fvar-tracking</samp>,
  261. except when selective scheduling is enabled.
  262. </p>
  263. </dd>
  264. <dt><code>-gsplit-dwarf</code></dt>
  265. <dd><a name="index-gsplit_002ddwarf"></a>
  266. <p>Separate as much DWARF debugging information as possible into a
  267. separate output file with the extension <samp>.dwo</samp>. This option allows
  268. the build system to avoid linking files with debug information. To
  269. be useful, this option requires a debugger capable of reading <samp>.dwo</samp>
  270. files.
  271. </p>
  272. </dd>
  273. <dt><code>-gpubnames</code></dt>
  274. <dd><a name="index-gpubnames"></a>
  275. <p>Generate DWARF <code>.debug_pubnames</code> and <code>.debug_pubtypes</code> sections.
  276. </p>
  277. </dd>
  278. <dt><code>-ggnu-pubnames</code></dt>
  279. <dd><a name="index-ggnu_002dpubnames"></a>
  280. <p>Generate <code>.debug_pubnames</code> and <code>.debug_pubtypes</code> sections in a format
  281. suitable for conversion into a GDB&nbsp;index. This option is only useful
  282. with a linker that can produce GDB&nbsp;index version 7.
  283. </p>
  284. </dd>
  285. <dt><code>-fdebug-types-section</code></dt>
  286. <dd><a name="index-fdebug_002dtypes_002dsection"></a>
  287. <a name="index-fno_002ddebug_002dtypes_002dsection"></a>
  288. <p>When using DWARF Version 4 or higher, type DIEs can be put into
  289. their own <code>.debug_types</code> section instead of making them part of the
  290. <code>.debug_info</code> section. It is more efficient to put them in a separate
  291. comdat sections since the linker can then remove duplicates.
  292. But not all DWARF consumers support <code>.debug_types</code> sections yet
  293. and on some objects <code>.debug_types</code> produces larger instead of smaller
  294. debugging information.
  295. </p>
  296. </dd>
  297. <dt><code>-grecord-gcc-switches</code></dt>
  298. <dt><code>-gno-record-gcc-switches</code></dt>
  299. <dd><a name="index-grecord_002dgcc_002dswitches"></a>
  300. <a name="index-gno_002drecord_002dgcc_002dswitches"></a>
  301. <p>This switch causes the command-line options used to invoke the
  302. compiler that may affect code generation to be appended to the
  303. DW_AT_producer attribute in DWARF debugging information. The options
  304. are concatenated with spaces separating them from each other and from
  305. the compiler version.
  306. It is enabled by default.
  307. See also <samp>-frecord-gcc-switches</samp> for another
  308. way of storing compiler options into the object file.
  309. </p>
  310. </dd>
  311. <dt><code>-gstrict-dwarf</code></dt>
  312. <dd><a name="index-gstrict_002ddwarf"></a>
  313. <p>Disallow using extensions of later DWARF standard version than selected
  314. with <samp>-gdwarf-<var>version</var></samp>. On most targets using non-conflicting
  315. DWARF extensions from later standard versions is allowed.
  316. </p>
  317. </dd>
  318. <dt><code>-gno-strict-dwarf</code></dt>
  319. <dd><a name="index-gno_002dstrict_002ddwarf"></a>
  320. <p>Allow using extensions of later DWARF standard version than selected with
  321. <samp>-gdwarf-<var>version</var></samp>.
  322. </p>
  323. </dd>
  324. <dt><code>-gcolumn-info</code></dt>
  325. <dt><code>-gno-column-info</code></dt>
  326. <dd><a name="index-gcolumn_002dinfo"></a>
  327. <a name="index-gno_002dcolumn_002dinfo"></a>
  328. <p>Emit location column information into DWARF debugging information, rather
  329. than just file and line.
  330. This option is disabled by default.
  331. </p>
  332. </dd>
  333. <dt><code>-gz<span class="roman">[</span>=<var>type</var><span class="roman">]</span></code></dt>
  334. <dd><a name="index-gz"></a>
  335. <p>Produce compressed debug sections in DWARF format, if that is supported.
  336. If <var>type</var> is not given, the default type depends on the capabilities
  337. of the assembler and linker used. <var>type</var> may be one of
  338. &lsquo;<samp>none</samp>&rsquo; (don&rsquo;t compress debug sections), &lsquo;<samp>zlib</samp>&rsquo; (use zlib
  339. compression in ELF gABI format), or &lsquo;<samp>zlib-gnu</samp>&rsquo; (use zlib
  340. compression in traditional GNU format). If the linker doesn&rsquo;t support
  341. writing compressed debug sections, the option is rejected. Otherwise,
  342. if the assembler does not support them, <samp>-gz</samp> is silently ignored
  343. when producing object files.
  344. </p>
  345. </dd>
  346. <dt><code>-feliminate-dwarf2-dups</code></dt>
  347. <dd><a name="index-feliminate_002ddwarf2_002ddups"></a>
  348. <p>Compress DWARF debugging information by eliminating duplicated
  349. information about each symbol. This option only makes sense when
  350. generating DWARF debugging information.
  351. </p>
  352. </dd>
  353. <dt><code>-femit-struct-debug-baseonly</code></dt>
  354. <dd><a name="index-femit_002dstruct_002ddebug_002dbaseonly"></a>
  355. <p>Emit debug information for struct-like types
  356. only when the base name of the compilation source file
  357. matches the base name of file in which the struct is defined.
  358. </p>
  359. <p>This option substantially reduces the size of debugging information,
  360. but at significant potential loss in type information to the debugger.
  361. See <samp>-femit-struct-debug-reduced</samp> for a less aggressive option.
  362. See <samp>-femit-struct-debug-detailed</samp> for more detailed control.
  363. </p>
  364. <p>This option works only with DWARF debug output.
  365. </p>
  366. </dd>
  367. <dt><code>-femit-struct-debug-reduced</code></dt>
  368. <dd><a name="index-femit_002dstruct_002ddebug_002dreduced"></a>
  369. <p>Emit debug information for struct-like types
  370. only when the base name of the compilation source file
  371. matches the base name of file in which the type is defined,
  372. unless the struct is a template or defined in a system header.
  373. </p>
  374. <p>This option significantly reduces the size of debugging information,
  375. with some potential loss in type information to the debugger.
  376. See <samp>-femit-struct-debug-baseonly</samp> for a more aggressive option.
  377. See <samp>-femit-struct-debug-detailed</samp> for more detailed control.
  378. </p>
  379. <p>This option works only with DWARF debug output.
  380. </p>
  381. </dd>
  382. <dt><code>-femit-struct-debug-detailed<span class="roman">[</span>=<var>spec-list</var><span class="roman">]</span></code></dt>
  383. <dd><a name="index-femit_002dstruct_002ddebug_002ddetailed"></a>
  384. <p>Specify the struct-like types
  385. for which the compiler generates debug information.
  386. The intent is to reduce duplicate struct debug information
  387. between different object files within the same program.
  388. </p>
  389. <p>This option is a detailed version of
  390. <samp>-femit-struct-debug-reduced</samp> and <samp>-femit-struct-debug-baseonly</samp>,
  391. which serves for most needs.
  392. </p>
  393. <p>A specification has the syntax<br>
  394. [&lsquo;<samp>dir:</samp>&rsquo;|&lsquo;<samp>ind:</samp>&rsquo;][&lsquo;<samp>ord:</samp>&rsquo;|&lsquo;<samp>gen:</samp>&rsquo;](&lsquo;<samp>any</samp>&rsquo;|&lsquo;<samp>sys</samp>&rsquo;|&lsquo;<samp>base</samp>&rsquo;|&lsquo;<samp>none</samp>&rsquo;)
  395. </p>
  396. <p>The optional first word limits the specification to
  397. structs that are used directly (&lsquo;<samp>dir:</samp>&rsquo;) or used indirectly (&lsquo;<samp>ind:</samp>&rsquo;).
  398. A struct type is used directly when it is the type of a variable, member.
  399. Indirect uses arise through pointers to structs.
  400. That is, when use of an incomplete struct is valid, the use is indirect.
  401. An example is
  402. &lsquo;<samp>struct one direct; struct two * indirect;</samp>&rsquo;.
  403. </p>
  404. <p>The optional second word limits the specification to
  405. ordinary structs (&lsquo;<samp>ord:</samp>&rsquo;) or generic structs (&lsquo;<samp>gen:</samp>&rsquo;).
  406. Generic structs are a bit complicated to explain.
  407. For C++, these are non-explicit specializations of template classes,
  408. or non-template classes within the above.
  409. Other programming languages have generics,
  410. but <samp>-femit-struct-debug-detailed</samp> does not yet implement them.
  411. </p>
  412. <p>The third word specifies the source files for those
  413. structs for which the compiler should emit debug information.
  414. The values &lsquo;<samp>none</samp>&rsquo; and &lsquo;<samp>any</samp>&rsquo; have the normal meaning.
  415. The value &lsquo;<samp>base</samp>&rsquo; means that
  416. the base of name of the file in which the type declaration appears
  417. must match the base of the name of the main compilation file.
  418. In practice, this means that when compiling <samp>foo.c</samp>, debug information
  419. is generated for types declared in that file and <samp>foo.h</samp>,
  420. but not other header files.
  421. The value &lsquo;<samp>sys</samp>&rsquo; means those types satisfying &lsquo;<samp>base</samp>&rsquo;
  422. or declared in system or compiler headers.
  423. </p>
  424. <p>You may need to experiment to determine the best settings for your application.
  425. </p>
  426. <p>The default is <samp>-femit-struct-debug-detailed=all</samp>.
  427. </p>
  428. <p>This option works only with DWARF debug output.
  429. </p>
  430. </dd>
  431. <dt><code>-fno-dwarf2-cfi-asm</code></dt>
  432. <dd><a name="index-fdwarf2_002dcfi_002dasm"></a>
  433. <a name="index-fno_002ddwarf2_002dcfi_002dasm"></a>
  434. <p>Emit DWARF unwind info as compiler generated <code>.eh_frame</code> section
  435. instead of using GAS <code>.cfi_*</code> directives.
  436. </p>
  437. </dd>
  438. <dt><code>-fno-eliminate-unused-debug-types</code></dt>
  439. <dd><a name="index-feliminate_002dunused_002ddebug_002dtypes"></a>
  440. <a name="index-fno_002deliminate_002dunused_002ddebug_002dtypes"></a>
  441. <p>Normally, when producing DWARF output, GCC avoids producing debug symbol
  442. output for types that are nowhere used in the source file being compiled.
  443. Sometimes it is useful to have GCC emit debugging
  444. information for all types declared in a compilation
  445. unit, regardless of whether or not they are actually used
  446. in that compilation unit, for example
  447. if, in the debugger, you want to cast a value to a type that is
  448. not actually used in your program (but is declared). More often,
  449. however, this results in a significant amount of wasted space.
  450. </p></dd>
  451. </dl>
  452. <hr>
  453. <div class="header">
  454. <p>
  455. Next: <a href="Optimize-Options.html#Optimize-Options" accesskey="n" rel="next">Optimize Options</a>, Previous: <a href="Warning-Options.html#Warning-Options" accesskey="p" rel="prev">Warning Options</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  456. </div>
  457. </body>
  458. </html>