Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

513 lines
22KB

  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-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Static Analyzer Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="Static Analyzer Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="Static Analyzer Options (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  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="Debugging-Options.html#Debugging-Options" rel="next" title="Debugging 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.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Static-Analyzer-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Debugging-Options.html#Debugging-Options" accesskey="n" rel="next">Debugging 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>
  65. </div>
  66. <hr>
  67. <a name="Options-That-Control-Static-Analysis"></a>
  68. <h3 class="section">3.9 Options That Control Static Analysis</h3>
  69. <dl compact="compact">
  70. <dt><code>-fanalyzer</code></dt>
  71. <dd><a name="index-analyzer"></a>
  72. <a name="index-fanalyzer"></a>
  73. <a name="index-fno_002danalyzer"></a>
  74. <p>This option enables an static analysis of program flow which looks
  75. for &ldquo;interesting&rdquo; interprocedural paths through the
  76. code, and issues warnings for problems found on them.
  77. </p>
  78. <p>This analysis is much more expensive than other GCC warnings.
  79. </p>
  80. <p>Enabling this option effectively enables the following warnings:
  81. </p>
  82. <div class="smallexample">
  83. <pre class="smallexample">
  84. -Wanalyzer-double-fclose
  85. -Wanalyzer-double-free
  86. -Wanalyzer-exposure-through-output-file
  87. -Wanalyzer-file-leak
  88. -Wanalyzer-free-of-non-heap
  89. -Wanalyzer-malloc-leak
  90. -Wanalyzer-possible-null-argument
  91. -Wanalyzer-possible-null-dereference
  92. -Wanalyzer-null-argument
  93. -Wanalyzer-null-dereference
  94. -Wanalyzer-stale-setjmp-buffer
  95. -Wanalyzer-tainted-array-index
  96. -Wanalyzer-unsafe-call-within-signal-handler
  97. -Wanalyzer-use-after-free
  98. -Wanalyzer-use-of-pointer-in-stale-stack-frame
  99. </pre></div>
  100. <p>This option is only available if GCC was configured with analyzer
  101. support enabled.
  102. </p>
  103. </dd>
  104. <dt><code>-Wanalyzer-too-complex</code></dt>
  105. <dd><a name="index-Wanalyzer_002dtoo_002dcomplex"></a>
  106. <a name="index-Wno_002danalyzer_002dtoo_002dcomplex"></a>
  107. <p>If <samp>-fanalyzer</samp> is enabled, the analyzer uses various heuristics
  108. to attempt to explore the control flow and data flow in the program,
  109. but these can be defeated by sufficiently complicated code.
  110. </p>
  111. <p>By default, the analysis silently stops if the code is too
  112. complicated for the analyzer to fully explore and it reaches an internal
  113. limit. The <samp>-Wanalyzer-too-complex</samp> option warns if this occurs.
  114. </p>
  115. </dd>
  116. <dt><code>-Wno-analyzer-double-fclose</code></dt>
  117. <dd><a name="index-Wanalyzer_002ddouble_002dfclose"></a>
  118. <a name="index-Wno_002danalyzer_002ddouble_002dfclose"></a>
  119. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  120. <samp>-Wno-analyzer-double-fclose</samp> to disable it.
  121. </p>
  122. <p>This diagnostic warns for paths through the code in which a <code>FILE *</code>
  123. can have <code>fclose</code> called on it more than once.
  124. </p>
  125. </dd>
  126. <dt><code>-Wno-analyzer-double-free</code></dt>
  127. <dd><a name="index-Wanalyzer_002ddouble_002dfree"></a>
  128. <a name="index-Wno_002danalyzer_002ddouble_002dfree"></a>
  129. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  130. <samp>-Wno-analyzer-double-free</samp> to disable it.
  131. </p>
  132. <p>This diagnostic warns for paths through the code in which a pointer
  133. can have <code>free</code> called on it more than once.
  134. </p>
  135. </dd>
  136. <dt><code>-Wno-analyzer-exposure-through-output-file</code></dt>
  137. <dd><a name="index-Wanalyzer_002dexposure_002dthrough_002doutput_002dfile"></a>
  138. <a name="index-Wno_002danalyzer_002dexposure_002dthrough_002doutput_002dfile"></a>
  139. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  140. <samp>-Wno-analyzer-exposure-through-output-file</samp>
  141. to disable it.
  142. </p>
  143. <p>This diagnostic warns for paths through the code in which a
  144. security-sensitive value is written to an output file
  145. (such as writing a password to a log file).
  146. </p>
  147. </dd>
  148. <dt><code>-Wno-analyzer-file-leak</code></dt>
  149. <dd><a name="index-Wanalyzer_002dfile_002dleak"></a>
  150. <a name="index-Wno_002danalyzer_002dfile_002dleak"></a>
  151. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  152. <samp>-Wno-analyzer-file-leak</samp>
  153. to disable it.
  154. </p>
  155. <p>This diagnostic warns for paths through the code in which a
  156. <code>&lt;stdio.h&gt;</code> <code>FILE *</code> stream object is leaked.
  157. </p>
  158. </dd>
  159. <dt><code>-Wno-analyzer-free-of-non-heap</code></dt>
  160. <dd><a name="index-Wanalyzer_002dfree_002dof_002dnon_002dheap"></a>
  161. <a name="index-Wno_002danalyzer_002dfree_002dof_002dnon_002dheap"></a>
  162. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  163. <samp>-Wno-analyzer-free-of-non-heap</samp>
  164. to disable it.
  165. </p>
  166. <p>This diagnostic warns for paths through the code in which <code>free</code>
  167. is called on a non-heap pointer (e.g. an on-stack buffer, or a global).
  168. </p>
  169. </dd>
  170. <dt><code>-Wno-analyzer-malloc-leak</code></dt>
  171. <dd><a name="index-Wanalyzer_002dmalloc_002dleak"></a>
  172. <a name="index-Wno_002danalyzer_002dmalloc_002dleak"></a>
  173. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  174. <samp>-Wno-analyzer-malloc-leak</samp>
  175. to disable it.
  176. </p>
  177. <p>This diagnostic warns for paths through the code in which a
  178. pointer allocated via <code>malloc</code> is leaked.
  179. </p>
  180. </dd>
  181. <dt><code>-Wno-analyzer-possible-null-argument</code></dt>
  182. <dd><a name="index-Wanalyzer_002dpossible_002dnull_002dargument"></a>
  183. <a name="index-Wno_002danalyzer_002dpossible_002dnull_002dargument"></a>
  184. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  185. <samp>-Wno-analyzer-possible-null-argument</samp> to disable it.
  186. </p>
  187. <p>This diagnostic warns for paths through the code in which a
  188. possibly-NULL value is passed to a function argument marked
  189. with <code>__attribute__((nonnull))</code> as requiring a non-NULL
  190. value.
  191. </p>
  192. </dd>
  193. <dt><code>-Wno-analyzer-possible-null-dereference</code></dt>
  194. <dd><a name="index-Wanalyzer_002dpossible_002dnull_002ddereference"></a>
  195. <a name="index-Wno_002danalyzer_002dpossible_002dnull_002ddereference"></a>
  196. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  197. <samp>-Wno-analyzer-possible-null-dereference</samp> to disable it.
  198. </p>
  199. <p>This diagnostic warns for paths through the code in which a
  200. possibly-NULL value is dereferenced.
  201. </p>
  202. </dd>
  203. <dt><code>-Wno-analyzer-null-argument</code></dt>
  204. <dd><a name="index-Wanalyzer_002dnull_002dargument"></a>
  205. <a name="index-Wno_002danalyzer_002dnull_002dargument"></a>
  206. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  207. <samp>-Wno-analyzer-null-argument</samp> to disable it.
  208. </p>
  209. <p>This diagnostic warns for paths through the code in which a
  210. value known to be NULL is passed to a function argument marked
  211. with <code>__attribute__((nonnull))</code> as requiring a non-NULL
  212. value.
  213. </p>
  214. </dd>
  215. <dt><code>-Wno-analyzer-null-dereference</code></dt>
  216. <dd><a name="index-Wanalyzer_002dnull_002ddereference"></a>
  217. <a name="index-Wno_002danalyzer_002dnull_002ddereference"></a>
  218. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  219. <samp>-Wno-analyzer-null-dereference</samp> to disable it.
  220. </p>
  221. <p>This diagnostic warns for paths through the code in which a
  222. value known to be NULL is dereferenced.
  223. </p>
  224. </dd>
  225. <dt><code>-Wno-analyzer-stale-setjmp-buffer</code></dt>
  226. <dd><a name="index-Wanalyzer_002dstale_002dsetjmp_002dbuffer"></a>
  227. <a name="index-Wno_002danalyzer_002dstale_002dsetjmp_002dbuffer"></a>
  228. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  229. <samp>-Wno-analyzer-stale-setjmp-buffer</samp> to disable it.
  230. </p>
  231. <p>This diagnostic warns for paths through the code in which
  232. <code>longjmp</code> is called to rewind to a <code>jmp_buf</code> relating
  233. to a <code>setjmp</code> call in a function that has returned.
  234. </p>
  235. <p>When <code>setjmp</code> is called on a <code>jmp_buf</code> to record a rewind
  236. location, it records the stack frame. The stack frame becomes invalid
  237. when the function containing the <code>setjmp</code> call returns. Attempting
  238. to rewind to it via <code>longjmp</code> would reference a stack frame that
  239. no longer exists, and likely lead to a crash (or worse).
  240. </p>
  241. </dd>
  242. <dt><code>-Wno-analyzer-tainted-array-index</code></dt>
  243. <dd><a name="index-Wanalyzer_002dtainted_002darray_002dindex"></a>
  244. <a name="index-Wno_002danalyzer_002dtainted_002darray_002dindex"></a>
  245. <p>This warning requires both <samp>-fanalyzer</samp> and
  246. <samp>-fanalyzer-checker=taint</samp> to enable it;
  247. use <samp>-Wno-analyzer-tainted-array-index</samp> to disable it.
  248. </p>
  249. <p>This diagnostic warns for paths through the code in which a value
  250. that could be under an attacker&rsquo;s control is used as the index
  251. of an array access without being sanitized.
  252. </p>
  253. </dd>
  254. <dt><code>-Wno-analyzer-unsafe-call-within-signal-handler</code></dt>
  255. <dd><a name="index-Wanalyzer_002dunsafe_002dcall_002dwithin_002dsignal_002dhandler"></a>
  256. <a name="index-Wno_002danalyzer_002dunsafe_002dcall_002dwithin_002dsignal_002dhandler"></a>
  257. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  258. <samp>-Wno-analyzer-unsafe-call-within-signal-handler</samp> to disable it.
  259. </p>
  260. <p>This diagnostic warns for paths through the code in which a
  261. function known to be async-signal-unsafe (such as <code>fprintf</code>) is
  262. called from a signal handler.
  263. </p>
  264. </dd>
  265. <dt><code>-Wno-analyzer-use-after-free</code></dt>
  266. <dd><a name="index-Wanalyzer_002duse_002dafter_002dfree"></a>
  267. <a name="index-Wno_002danalyzer_002duse_002dafter_002dfree"></a>
  268. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  269. <samp>-Wno-analyzer-use-after-free</samp> to disable it.
  270. </p>
  271. <p>This diagnostic warns for paths through the code in which a
  272. pointer is used after <code>free</code> is called on it.
  273. </p>
  274. </dd>
  275. <dt><code>-Wno-analyzer-use-of-pointer-in-stale-stack-frame</code></dt>
  276. <dd><a name="index-Wanalyzer_002duse_002dof_002dpointer_002din_002dstale_002dstack_002dframe"></a>
  277. <a name="index-Wno_002danalyzer_002duse_002dof_002dpointer_002din_002dstale_002dstack_002dframe"></a>
  278. <p>This warning requires <samp>-fanalyzer</samp>, which enables it; use
  279. <samp>-Wno-analyzer-use-of-pointer-in-stale-stack-frame</samp>
  280. to disable it.
  281. </p>
  282. <p>This diagnostic warns for paths through the code in which a pointer
  283. is dereferenced that points to a variable in a stale stack frame.
  284. </p>
  285. </dd>
  286. </dl>
  287. <p>Pertinent parameters for controlling the exploration are:
  288. <samp>--param analyzer-bb-explosion-factor=<var>value</var></samp>,
  289. <samp>--param analyzer-max-enodes-per-program-point=<var>value</var></samp>,
  290. <samp>--param analyzer-max-recursion-depth=<var>value</var></samp>, and
  291. <samp>--param analyzer-min-snodes-for-call-summary=<var>value</var></samp>.
  292. </p>
  293. <p>The following options control the analyzer.
  294. </p>
  295. <dl compact="compact">
  296. <dt><code>-fanalyzer-call-summaries</code></dt>
  297. <dd><a name="index-fanalyzer_002dcall_002dsummaries"></a>
  298. <a name="index-fno_002danalyzer_002dcall_002dsummaries"></a>
  299. <p>Simplify interprocedural analysis by computing the effect of certain calls,
  300. rather than exploring all paths through the function from callsite to each
  301. possible return.
  302. </p>
  303. <p>If enabled, call summaries are only used for functions with more than one
  304. call site, and that are sufficiently complicated (as per
  305. <samp>--param analyzer-min-snodes-for-call-summary=<var>value</var></samp>).
  306. </p>
  307. </dd>
  308. <dt><code>-fanalyzer-checker=<var>name</var></code></dt>
  309. <dd><a name="index-fanalyzer_002dchecker"></a>
  310. <p>Restrict the analyzer to run just the named checker, and enable it.
  311. </p>
  312. <p>Some checkers are disabled by default (even with <samp>-fanalyzer</samp>),
  313. such as the <code>taint</code> checker that implements
  314. <samp>-Wanalyzer-tainted-array-index</samp>, and this option is required
  315. to enable them.
  316. </p>
  317. </dd>
  318. <dt><code>-fanalyzer-fine-grained</code></dt>
  319. <dd><a name="index-fanalyzer_002dfine_002dgrained"></a>
  320. <a name="index-fno_002danalyzer_002dfine_002dgrained"></a>
  321. <p>This option is intended for analyzer developers.
  322. </p>
  323. <p>Internally the analyzer builds an &ldquo;exploded graph&rdquo; that combines
  324. control flow graphs with data flow information.
  325. </p>
  326. <p>By default, an edge in this graph can contain the effects of a run
  327. of multiple statements within a basic block. With
  328. <samp>-fanalyzer-fine-grained</samp>, each statement gets its own edge.
  329. </p>
  330. </dd>
  331. <dt><code>-fanalyzer-show-duplicate-count</code></dt>
  332. <dd><a name="index-fanalyzer_002dshow_002dduplicate_002dcount"></a>
  333. <a name="index-fno_002danalyzer_002dshow_002dduplicate_002dcount"></a>
  334. <p>This option is intended for analyzer developers: if multiple diagnostics
  335. have been detected as being duplicates of each other, it emits a note when
  336. reporting the best diagnostic, giving the number of additional diagnostics
  337. that were suppressed by the deduplication logic.
  338. </p>
  339. </dd>
  340. <dt><code>-fno-analyzer-state-merge</code></dt>
  341. <dd><a name="index-fanalyzer_002dstate_002dmerge"></a>
  342. <a name="index-fno_002danalyzer_002dstate_002dmerge"></a>
  343. <p>This option is intended for analyzer developers.
  344. </p>
  345. <p>By default the analyzer attempts to simplify analysis by merging
  346. sufficiently similar states at each program point as it builds its
  347. &ldquo;exploded graph&rdquo;. With <samp>-fno-analyzer-state-merge</samp> this
  348. merging can be suppressed, for debugging state-handling issues.
  349. </p>
  350. </dd>
  351. <dt><code>-fno-analyzer-state-purge</code></dt>
  352. <dd><a name="index-fanalyzer_002dstate_002dpurge"></a>
  353. <a name="index-fno_002danalyzer_002dstate_002dpurge"></a>
  354. <p>This option is intended for analyzer developers.
  355. </p>
  356. <p>By default the analyzer attempts to simplify analysis by purging
  357. aspects of state at a program point that appear to no longer be relevant
  358. e.g. the values of locals that aren&rsquo;t accessed later in the function
  359. and which aren&rsquo;t relevant to leak analysis.
  360. </p>
  361. <p>With <samp>-fno-analyzer-state-purge</samp> this purging of state can
  362. be suppressed, for debugging state-handling issues.
  363. </p>
  364. </dd>
  365. <dt><code>-fanalyzer-transitivity</code></dt>
  366. <dd><a name="index-fanalyzer_002dtransitivity"></a>
  367. <a name="index-fno_002danalyzer_002dtransitivity"></a>
  368. <p>This option enables transitivity of constraints within the analyzer.
  369. </p>
  370. </dd>
  371. <dt><code>-fanalyzer-verbose-edges</code></dt>
  372. <dd><p>This option is intended for analyzer developers. It enables more
  373. verbose, lower-level detail in the descriptions of control flow
  374. within diagnostic paths.
  375. </p>
  376. </dd>
  377. <dt><code>-fanalyzer-verbose-state-changes</code></dt>
  378. <dd><p>This option is intended for analyzer developers. It enables more
  379. verbose, lower-level detail in the descriptions of events relating
  380. to state machines within diagnostic paths.
  381. </p>
  382. </dd>
  383. <dt><code>-fanalyzer-verbosity=<var>level</var></code></dt>
  384. <dd><p>This option controls the complexity of the control flow paths that are
  385. emitted for analyzer diagnostics.
  386. </p>
  387. <p>The <var>level</var> can be one of:
  388. </p>
  389. <dl compact="compact">
  390. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  391. <dd><p>At this level, interprocedural call and return events are displayed,
  392. along with the most pertinent state-change events relating to
  393. a diagnostic. For example, for a double-<code>free</code> diagnostic,
  394. both calls to <code>free</code> will be shown.
  395. </p>
  396. </dd>
  397. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  398. <dd><p>As per the previous level, but also show events for the entry
  399. to each function.
  400. </p>
  401. </dd>
  402. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  403. <dd><p>As per the previous level, but also show events relating to
  404. control flow that are significant to triggering the issue
  405. (e.g. &ldquo;true path taken&rdquo; at a conditional).
  406. </p>
  407. <p>This level is the default.
  408. </p>
  409. </dd>
  410. <dt>&lsquo;<samp>3</samp>&rsquo;</dt>
  411. <dd><p>As per the previous level, but show all control flow events, not
  412. just significant ones.
  413. </p>
  414. </dd>
  415. <dt>&lsquo;<samp>4</samp>&rsquo;</dt>
  416. <dd><p>This level is intended for analyzer developers; it adds various
  417. other events intended for debugging the analyzer.
  418. </p>
  419. </dd>
  420. </dl>
  421. </dd>
  422. <dt><code>-fdump-analyzer</code></dt>
  423. <dd><a name="index-fdump_002danalyzer"></a>
  424. <p>Dump internal details about what the analyzer is doing to
  425. <samp><var>file</var>.analyzer.txt</samp>.
  426. This option is overridden by <samp>-fdump-analyzer-stderr</samp>.
  427. </p>
  428. </dd>
  429. <dt><code>-fdump-analyzer-stderr</code></dt>
  430. <dd><a name="index-fdump_002danalyzer_002dstderr"></a>
  431. <p>Dump internal details about what the analyzer is doing to stderr.
  432. This option overrides <samp>-fdump-analyzer</samp>.
  433. </p>
  434. </dd>
  435. <dt><code>-fdump-analyzer-callgraph</code></dt>
  436. <dd><a name="index-fdump_002danalyzer_002dcallgraph"></a>
  437. <p>Dump a representation of the call graph suitable for viewing with
  438. GraphViz to <samp><var>file</var>.callgraph.dot</samp>.
  439. </p>
  440. </dd>
  441. <dt><code>-fdump-analyzer-exploded-graph</code></dt>
  442. <dd><a name="index-fdump_002danalyzer_002dexploded_002dgraph"></a>
  443. <p>Dump a representation of the &ldquo;exploded graph&rdquo; suitable for viewing with
  444. GraphViz to <samp><var>file</var>.eg.dot</samp>.
  445. Nodes are color-coded based on state-machine states to emphasize
  446. state changes.
  447. </p>
  448. </dd>
  449. <dt><code>-fdump-analyzer-exploded-nodes</code></dt>
  450. <dd><a name="index-dump_002danalyzer_002dexploded_002dnodes"></a>
  451. <p>Emit diagnostics showing where nodes in the &ldquo;exploded graph&rdquo; are
  452. in relation to the program source.
  453. </p>
  454. </dd>
  455. <dt><code>-fdump-analyzer-exploded-nodes-2</code></dt>
  456. <dd><a name="index-dump_002danalyzer_002dexploded_002dnodes_002d2"></a>
  457. <p>Dump a textual representation of the &ldquo;exploded graph&rdquo; to
  458. <samp><var>file</var>.eg.txt</samp>.
  459. </p>
  460. </dd>
  461. <dt><code>-fdump-analyzer-exploded-nodes-3</code></dt>
  462. <dd><a name="index-dump_002danalyzer_002dexploded_002dnodes_002d3"></a>
  463. <p>Dump a textual representation of the &ldquo;exploded graph&rdquo; to
  464. one dump file per node, to <samp><var>file</var>.eg-<var>id</var>.txt</samp>.
  465. This is typically a large number of dump files.
  466. </p>
  467. </dd>
  468. <dt><code>-fdump-analyzer-state-purge</code></dt>
  469. <dd><a name="index-fdump_002danalyzer_002dstate_002dpurge"></a>
  470. <p>As per <samp>-fdump-analyzer-supergraph</samp>, dump a representation of the
  471. &ldquo;supergraph&rdquo; suitable for viewing with GraphViz, but annotate the
  472. graph with information on what state will be purged at each node.
  473. The graph is written to <samp><var>file</var>.state-purge.dot</samp>.
  474. </p>
  475. </dd>
  476. <dt><code>-fdump-analyzer-supergraph</code></dt>
  477. <dd><a name="index-fdump_002danalyzer_002dsupergraph"></a>
  478. <p>Dump representations of the &ldquo;supergraph&rdquo; suitable for viewing with
  479. GraphViz to <samp><var>file</var>.supergraph.dot</samp> and to
  480. <samp><var>file</var>.supergraph-eg.dot</samp>. These show all of the
  481. control flow graphs in the program, with interprocedural edges for
  482. calls and returns. The second dump contains annotations showing nodes
  483. in the &ldquo;exploded graph&rdquo; and diagnostics associated with them.
  484. </p>
  485. </dd>
  486. </dl>
  487. <hr>
  488. <div class="header">
  489. <p>
  490. Next: <a href="Debugging-Options.html#Debugging-Options" accesskey="n" rel="next">Debugging 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>
  491. </div>
  492. </body>
  493. </html>