Maintenance-Commands.html 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  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 "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>Debugging with GDB: Maintenance Commands</title>
  16. <meta name="description" content="Debugging with GDB: Maintenance Commands">
  17. <meta name="keywords" content="Debugging with GDB: Maintenance Commands">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="index.html#Top" rel="up" title="Top">
  26. <link href="Remote-Protocol.html#Remote-Protocol" rel="next" title="Remote Protocol">
  27. <link href="System_002dwide-Configuration-Scripts.html#System_002dwide-Configuration-Scripts" rel="previous" title="System-wide Configuration Scripts">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style:oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="Maintenance-Commands"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="Remote-Protocol.html#Remote-Protocol" accesskey="n" rel="next">Remote Protocol</a>, Previous: <a href="Installing-GDB.html#Installing-GDB" accesskey="p" rel="previous">Installing GDB</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  62. </div>
  63. <hr>
  64. <a name="Maintenance-Commands-1"></a>
  65. <h2 class="appendix">Appendix D Maintenance Commands</h2>
  66. <a name="index-maintenance-commands"></a>
  67. <a name="index-internal-commands"></a>
  68. <p>In addition to commands intended for <small>GDB</small> users, <small>GDB</small>
  69. includes a number of commands intended for <small>GDB</small> developers,
  70. that are not documented elsewhere in this manual. These commands are
  71. provided here for reference. (For commands that turn on debugging
  72. messages, see <a href="Debugging-Output.html#Debugging-Output">Debugging Output</a>.)
  73. </p>
  74. <dl compact="compact">
  75. <dd><a name="index-maint-agent"></a>
  76. <a name="index-maint-agent_002deval"></a>
  77. </dd>
  78. <dt><code>maint agent <span class="roman">[</span>-at <var>location</var><span class="roman">,</span><span class="roman">]</span> <var>expression</var></code></dt>
  79. <dt><code>maint agent-eval <span class="roman">[</span>-at <var>location</var><span class="roman">,</span><span class="roman">]</span> <var>expression</var></code></dt>
  80. <dd><p>Translate the given <var>expression</var> into remote agent bytecodes.
  81. This command is useful for debugging the Agent Expression mechanism
  82. (see <a href="Agent-Expressions.html#Agent-Expressions">Agent Expressions</a>). The &lsquo;<samp>agent</samp>&rsquo; version produces an
  83. expression useful for data collection, such as by tracepoints, while
  84. &lsquo;<samp>maint agent-eval</samp>&rsquo; produces an expression that evaluates directly
  85. to a result. For instance, a collection expression for <code>globa +
  86. globb</code> will include bytecodes to record four bytes of memory at each
  87. of the addresses of <code>globa</code> and <code>globb</code>, while discarding
  88. the result of the addition, while an evaluation expression will do the
  89. addition and return the sum.
  90. If <code>-at</code> is given, generate remote agent bytecode for <var>location</var>.
  91. If not, generate remote agent bytecode for current frame PC address.
  92. </p>
  93. <a name="index-maint-agent_002dprintf"></a>
  94. </dd>
  95. <dt><code>maint agent-printf <var>format</var>,<var>expr</var>,...</code></dt>
  96. <dd><p>Translate the given format string and list of argument expressions
  97. into remote agent bytecodes and display them as a disassembled list.
  98. This command is useful for debugging the agent version of dynamic
  99. printf (see <a href="Dynamic-Printf.html#Dynamic-Printf">Dynamic Printf</a>).
  100. </p>
  101. <a name="index-maint-info-breakpoints"></a>
  102. </dd>
  103. <dt><code><a name="maint-info-breakpoints"></a>maint info breakpoints</code></dt>
  104. <dd><p>Using the same format as &lsquo;<samp>info breakpoints</samp>&rsquo;, display both the
  105. breakpoints you&rsquo;ve set explicitly, and those <small>GDB</small> is using for
  106. internal purposes. Internal breakpoints are shown with negative
  107. breakpoint numbers. The type column identifies what kind of breakpoint
  108. is shown:
  109. </p>
  110. <dl compact="compact">
  111. <dt><code>breakpoint</code></dt>
  112. <dd><p>Normal, explicitly set breakpoint.
  113. </p>
  114. </dd>
  115. <dt><code>watchpoint</code></dt>
  116. <dd><p>Normal, explicitly set watchpoint.
  117. </p>
  118. </dd>
  119. <dt><code>longjmp</code></dt>
  120. <dd><p>Internal breakpoint, used to handle correctly stepping through
  121. <code>longjmp</code> calls.
  122. </p>
  123. </dd>
  124. <dt><code>longjmp resume</code></dt>
  125. <dd><p>Internal breakpoint at the target of a <code>longjmp</code>.
  126. </p>
  127. </dd>
  128. <dt><code>until</code></dt>
  129. <dd><p>Temporary internal breakpoint used by the <small>GDB</small> <code>until</code> command.
  130. </p>
  131. </dd>
  132. <dt><code>finish</code></dt>
  133. <dd><p>Temporary internal breakpoint used by the <small>GDB</small> <code>finish</code> command.
  134. </p>
  135. </dd>
  136. <dt><code>shlib events</code></dt>
  137. <dd><p>Shared library events.
  138. </p>
  139. </dd>
  140. </dl>
  141. <a name="index-maint-info-btrace"></a>
  142. </dd>
  143. <dt><code>maint info btrace</code></dt>
  144. <dd><p>Pint information about raw branch tracing data.
  145. </p>
  146. <a name="index-maint-btrace-packet_002dhistory"></a>
  147. </dd>
  148. <dt><code>maint btrace packet-history</code></dt>
  149. <dd><p>Print the raw branch trace packets that are used to compute the
  150. execution history for the &lsquo;<samp>record btrace</samp>&rsquo; command. Both the
  151. information and the format in which it is printed depend on the btrace
  152. recording format.
  153. </p>
  154. <dl compact="compact">
  155. <dt><code>bts</code></dt>
  156. <dd><p>For the BTS recording format, print a list of blocks of sequential
  157. code. For each block, the following information is printed:
  158. </p>
  159. <dl compact="compact">
  160. <dt>Block number</dt>
  161. <dd><p>Newer blocks have higher numbers. The oldest block has number zero.
  162. </p></dd>
  163. <dt>Lowest &lsquo;<samp>PC</samp>&rsquo;</dt>
  164. <dt>Highest &lsquo;<samp>PC</samp>&rsquo;</dt>
  165. </dl>
  166. </dd>
  167. <dt><code>pt</code></dt>
  168. <dd><p>For the Intel Processor Trace recording format, print a list of
  169. Intel Processor Trace packets. For each packet, the following
  170. information is printed:
  171. </p>
  172. <dl compact="compact">
  173. <dt>Packet number</dt>
  174. <dd><p>Newer packets have higher numbers. The oldest packet has number zero.
  175. </p></dd>
  176. <dt>Trace offset</dt>
  177. <dd><p>The packet&rsquo;s offset in the trace stream.
  178. </p></dd>
  179. <dt>Packet opcode and payload</dt>
  180. </dl>
  181. </dd>
  182. </dl>
  183. <a name="index-maint-btrace-clear_002dpacket_002dhistory"></a>
  184. </dd>
  185. <dt><code>maint btrace clear-packet-history</code></dt>
  186. <dd><p>Discards the cached packet history printed by the &lsquo;<samp>maint btrace
  187. packet-history</samp>&rsquo; command. The history will be computed again when
  188. needed.
  189. </p>
  190. <a name="index-maint-btrace-clear"></a>
  191. </dd>
  192. <dt><code>maint btrace clear</code></dt>
  193. <dd><p>Discard the branch trace data. The data will be fetched anew and the
  194. branch trace will be recomputed when needed.
  195. </p>
  196. <p>This implicitly truncates the branch trace to a single branch trace
  197. buffer. When updating branch trace incrementally, the branch trace
  198. available to <small>GDB</small> may be bigger than a single branch trace
  199. buffer.
  200. </p>
  201. <a name="index-maint-set-btrace-pt-skip_002dpad"></a>
  202. </dd>
  203. <dt><code>maint set btrace pt skip-pad</code></dt>
  204. <dd><a name="index-maint-show-btrace-pt-skip_002dpad"></a>
  205. </dd>
  206. <dt><code>maint show btrace pt skip-pad</code></dt>
  207. <dd><p>Control whether <small>GDB</small> will skip PAD packets when computing the
  208. packet history.
  209. </p>
  210. <a name="index-set-displaced_002dstepping"></a>
  211. <a name="index-show-displaced_002dstepping"></a>
  212. <a name="index-displaced-stepping-support"></a>
  213. <a name="index-out_002dof_002dline-single_002dstepping"></a>
  214. </dd>
  215. <dt><code>set displaced-stepping</code></dt>
  216. <dt><code>show displaced-stepping</code></dt>
  217. <dd><p>Control whether or not <small>GDB</small> will do <em>displaced stepping</em>
  218. if the target supports it. Displaced stepping is a way to single-step
  219. over breakpoints without removing them from the inferior, by executing
  220. an out-of-line copy of the instruction that was originally at the
  221. breakpoint location. It is also known as out-of-line single-stepping.
  222. </p>
  223. <dl compact="compact">
  224. <dt><code>set displaced-stepping on</code></dt>
  225. <dd><p>If the target architecture supports it, <small>GDB</small> will use
  226. displaced stepping to step over breakpoints.
  227. </p>
  228. </dd>
  229. <dt><code>set displaced-stepping off</code></dt>
  230. <dd><p><small>GDB</small> will not use displaced stepping to step over breakpoints,
  231. even if such is supported by the target architecture.
  232. </p>
  233. <a name="index-non_002dstop-mode_002c-and-set-displaced_002dstepping"></a>
  234. </dd>
  235. <dt><code>set displaced-stepping auto</code></dt>
  236. <dd><p>This is the default mode. <small>GDB</small> will use displaced stepping
  237. only if non-stop mode is active (see <a href="Non_002dStop-Mode.html#Non_002dStop-Mode">Non-Stop Mode</a>) and the target
  238. architecture supports displaced stepping.
  239. </p></dd>
  240. </dl>
  241. <a name="index-maint-check_002dpsymtabs"></a>
  242. </dd>
  243. <dt><code>maint check-psymtabs</code></dt>
  244. <dd><p>Check the consistency of currently expanded psymtabs versus symtabs.
  245. Use this to check, for example, whether a symbol is in one but not the other.
  246. </p>
  247. <a name="index-maint-check_002dsymtabs"></a>
  248. </dd>
  249. <dt><code>maint check-symtabs</code></dt>
  250. <dd><p>Check the consistency of currently expanded symtabs.
  251. </p>
  252. <a name="index-maint-expand_002dsymtabs"></a>
  253. </dd>
  254. <dt><code>maint expand-symtabs [<var>regexp</var>]</code></dt>
  255. <dd><p>Expand symbol tables.
  256. If <var>regexp</var> is specified, only expand symbol tables for file
  257. names matching <var>regexp</var>.
  258. </p>
  259. <a name="index-maint-set-catch_002ddemangler_002dcrashes"></a>
  260. <a name="index-maint-show-catch_002ddemangler_002dcrashes"></a>
  261. <a name="index-demangler-crashes"></a>
  262. </dd>
  263. <dt><code>maint set catch-demangler-crashes [on|off]</code></dt>
  264. <dt><code>maint show catch-demangler-crashes</code></dt>
  265. <dd><p>Control whether <small>GDB</small> should attempt to catch crashes in the
  266. symbol name demangler. The default is to attempt to catch crashes.
  267. If enabled, the first time a crash is caught, a core file is created,
  268. the offending symbol is displayed and the user is presented with the
  269. option to terminate the current session.
  270. </p>
  271. <a name="index-maint-cplus-first_005fcomponent"></a>
  272. </dd>
  273. <dt><code>maint cplus first_component <var>name</var></code></dt>
  274. <dd><p>Print the first C<tt>++</tt> class/namespace component of <var>name</var>.
  275. </p>
  276. <a name="index-maint-cplus-namespace"></a>
  277. </dd>
  278. <dt><code>maint cplus namespace</code></dt>
  279. <dd><p>Print the list of possible C<tt>++</tt> namespaces.
  280. </p>
  281. <a name="index-maint-deprecate"></a>
  282. <a name="index-maint-undeprecate"></a>
  283. <a name="index-deprecated-commands"></a>
  284. </dd>
  285. <dt><code>maint deprecate <var>command</var> <span class="roman">[</span><var>replacement</var><span class="roman">]</span></code></dt>
  286. <dt><code>maint undeprecate <var>command</var></code></dt>
  287. <dd><p>Deprecate or undeprecate the named <var>command</var>. Deprecated commands
  288. cause <small>GDB</small> to issue a warning when you use them. The optional
  289. argument <var>replacement</var> says which newer command should be used in
  290. favor of the deprecated one; if it is given, <small>GDB</small> will mention
  291. the replacement as part of the warning.
  292. </p>
  293. <a name="index-maint-dump_002dme"></a>
  294. </dd>
  295. <dt><code>maint dump-me</code></dt>
  296. <dd><a name="index-SIGQUIT-signal_002c-dump-core-of-GDB"></a>
  297. <p>Cause a fatal signal in the debugger and force it to dump its core.
  298. This is supported only on systems which support aborting a program
  299. with the <code>SIGQUIT</code> signal.
  300. </p>
  301. <a name="index-maint-internal_002derror"></a>
  302. <a name="index-maint-internal_002dwarning"></a>
  303. <a name="index-maint-demangler_002dwarning"></a>
  304. <a name="index-demangler-crashes-1"></a>
  305. </dd>
  306. <dt><code>maint internal-error <span class="roman">[</span><var>message-text</var><span class="roman">]</span></code></dt>
  307. <dt><code>maint internal-warning <span class="roman">[</span><var>message-text</var><span class="roman">]</span></code></dt>
  308. <dt><code>maint demangler-warning <span class="roman">[</span><var>message-text</var><span class="roman">]</span></code></dt>
  309. <dd>
  310. <p>Cause <small>GDB</small> to call the internal function <code>internal_error</code>,
  311. <code>internal_warning</code> or <code>demangler_warning</code> and hence behave
  312. as though an internal problem has been detected. In addition to
  313. reporting the internal problem, these functions give the user the
  314. opportunity to either quit <small>GDB</small> or (for <code>internal_error</code>
  315. and <code>internal_warning</code>) create a core file of the current
  316. <small>GDB</small> session.
  317. </p>
  318. <p>These commands take an optional parameter <var>message-text</var> that is
  319. used as the text of the error or warning message.
  320. </p>
  321. <p>Here&rsquo;s an example of using <code>internal-error</code>:
  322. </p>
  323. <div class="smallexample">
  324. <pre class="smallexample">(gdb) <kbd>maint internal-error testing, 1, 2</kbd>
  325. &hellip;/maint.c:121: internal-error: testing, 1, 2
  326. A problem internal to GDB has been detected. Further
  327. debugging may prove unreliable.
  328. Quit this debugging session? (y or n) <kbd>n</kbd>
  329. Create a core file? (y or n) <kbd>n</kbd>
  330. (gdb)
  331. </pre></div>
  332. <a name="index-GDB-internal-error"></a>
  333. <a name="index-internal-errors_002c-control-of-GDB-behavior"></a>
  334. <a name="index-demangler-crashes-2"></a>
  335. <a name="index-maint-set-internal_002derror"></a>
  336. <a name="index-maint-show-internal_002derror"></a>
  337. <a name="index-maint-set-internal_002dwarning"></a>
  338. <a name="index-maint-show-internal_002dwarning"></a>
  339. <a name="index-maint-set-demangler_002dwarning"></a>
  340. <a name="index-maint-show-demangler_002dwarning"></a>
  341. </dd>
  342. <dt><code>maint set internal-error <var>action</var> [ask|yes|no]</code></dt>
  343. <dt><code>maint show internal-error <var>action</var></code></dt>
  344. <dt><code>maint set internal-warning <var>action</var> [ask|yes|no]</code></dt>
  345. <dt><code>maint show internal-warning <var>action</var></code></dt>
  346. <dt><code>maint set demangler-warning <var>action</var> [ask|yes|no]</code></dt>
  347. <dt><code>maint show demangler-warning <var>action</var></code></dt>
  348. <dd><p>When <small>GDB</small> reports an internal problem (error or warning) it
  349. gives the user the opportunity to both quit <small>GDB</small> and create a
  350. core file of the current <small>GDB</small> session. These commands let you
  351. override the default behaviour for each particular <var>action</var>,
  352. described in the table below.
  353. </p>
  354. <dl compact="compact">
  355. <dt>&lsquo;<samp>quit</samp>&rsquo;</dt>
  356. <dd><p>You can specify that <small>GDB</small> should always (yes) or never (no)
  357. quit. The default is to ask the user what to do.
  358. </p>
  359. </dd>
  360. <dt>&lsquo;<samp>corefile</samp>&rsquo;</dt>
  361. <dd><p>You can specify that <small>GDB</small> should always (yes) or never (no)
  362. create a core file. The default is to ask the user what to do. Note
  363. that there is no <code>corefile</code> option for <code>demangler-warning</code>:
  364. demangler warnings always create a core file and this cannot be
  365. disabled.
  366. </p></dd>
  367. </dl>
  368. <a name="index-maint-packet"></a>
  369. </dd>
  370. <dt><code>maint packet <var>text</var></code></dt>
  371. <dd><p>If <small>GDB</small> is talking to an inferior via the serial protocol,
  372. then this command sends the string <var>text</var> to the inferior, and
  373. displays the response packet. <small>GDB</small> supplies the initial
  374. &lsquo;<samp>$</samp>&rsquo; character, the terminating &lsquo;<samp>#</samp>&rsquo; character, and the
  375. checksum.
  376. </p>
  377. <a name="index-maint-print-architecture"></a>
  378. </dd>
  379. <dt><code>maint print architecture <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  380. <dd><p>Print the entire architecture configuration. The optional argument
  381. <var>file</var> names the file where the output goes.
  382. </p>
  383. <a name="index-maint-print-c_002dtdesc-_005bfile_005d"></a>
  384. </dd>
  385. <dt><code>maint print c-tdesc</code></dt>
  386. <dd><p>Print the target description (see <a href="Target-Descriptions.html#Target-Descriptions">Target Descriptions</a>) as
  387. a C source file. By default, the target description is for the current
  388. target, but if the optional argument <var>file</var> is provided, that file
  389. is used to produce the description. The <var>file</var> should be an XML
  390. document, of the form described in <a href="Target-Description-Format.html#Target-Description-Format">Target Description Format</a>.
  391. The created source file is built into <small>GDB</small> when <small>GDB</small> is
  392. built again. This command is used by developers after they add or
  393. modify XML target descriptions.
  394. </p>
  395. <a name="index-maint-print-xml_002dtdesc"></a>
  396. </dd>
  397. <dt><code>maint print xml-tdesc <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  398. <dd><p>Print the target description (see <a href="Target-Descriptions.html#Target-Descriptions">Target Descriptions</a>) as an XML
  399. file. By default print the target description for the current target,
  400. but if the optional argument <var>file</var> is provided, then that file is
  401. read in by GDB and then used to produce the description. The
  402. <var>file</var> should be an XML document, of the form described in
  403. <a href="Target-Description-Format.html#Target-Description-Format">Target Description Format</a>.
  404. </p>
  405. <a name="index-maint-check-xml_002ddescriptions"></a>
  406. </dd>
  407. <dt><code>maint check xml-descriptions <var>dir</var></code></dt>
  408. <dd><p>Check that the target descriptions dynamically created by <small>GDB</small>
  409. equal the descriptions created from XML files found in <var>dir</var>.
  410. </p>
  411. <a name="maint-check-libthread_002ddb"></a><a name="index-maint-check-libthread_002ddb"></a>
  412. </dd>
  413. <dt><code>maint check libthread-db</code></dt>
  414. <dd><p>Run integrity checks on the current inferior&rsquo;s thread debugging
  415. library. This exercises all <code>libthread_db</code> functionality used by
  416. <small>GDB</small> on GNU/Linux systems, and by extension also exercises the
  417. <code>proc_service</code> functions provided by <small>GDB</small> that
  418. <code>libthread_db</code> uses. Note that parts of the test may be skipped
  419. on some platforms when debugging core files.
  420. </p>
  421. <a name="index-maint-print-core_002dfile_002dbacked_002dmappings"></a>
  422. <a name="index-memory-address-space-mappings-1"></a>
  423. </dd>
  424. <dt><code>maint print core-file-backed-mappings</code></dt>
  425. <dd><p>Print the file-backed mappings which were loaded from a core file note.
  426. This output represents state internal to <small>GDB</small> and should be
  427. similar to the mappings displayed by the <code>info proc mappings</code>
  428. command.
  429. </p>
  430. <a name="index-maint-print-dummy_002dframes"></a>
  431. </dd>
  432. <dt><code>maint print dummy-frames</code></dt>
  433. <dd><p>Prints the contents of <small>GDB</small>&rsquo;s internal dummy-frame stack.
  434. </p>
  435. <div class="smallexample">
  436. <pre class="smallexample">(gdb) <kbd>b add</kbd>
  437. &hellip;
  438. (gdb) <kbd>print add(2,3)</kbd>
  439. Breakpoint 2, add (a=2, b=3) at &hellip;
  440. 58 return (a + b);
  441. The program being debugged stopped while in a function called from GDB.
  442. &hellip;
  443. (gdb) <kbd>maint print dummy-frames</kbd>
  444. 0xa8206d8: id={stack=0xbfffe734,code=0xbfffe73f,!special}, ptid=process 9353
  445. (gdb)
  446. </pre></div>
  447. <p>Takes an optional file parameter.
  448. </p>
  449. <a name="index-maint-print-registers"></a>
  450. <a name="index-maint-print-raw_002dregisters"></a>
  451. <a name="index-maint-print-cooked_002dregisters"></a>
  452. <a name="index-maint-print-register_002dgroups"></a>
  453. <a name="index-maint-print-remote_002dregisters"></a>
  454. </dd>
  455. <dt><code>maint print registers <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  456. <dt><code>maint print raw-registers <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  457. <dt><code>maint print cooked-registers <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  458. <dt><code>maint print register-groups <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  459. <dt><code>maint print remote-registers <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  460. <dd><p>Print <small>GDB</small>&rsquo;s internal register data structures.
  461. </p>
  462. <p>The command <code>maint print raw-registers</code> includes the contents of
  463. the raw register cache; the command <code>maint print
  464. cooked-registers</code> includes the (cooked) value of all registers,
  465. including registers which aren&rsquo;t available on the target nor visible
  466. to user; the command <code>maint print register-groups</code> includes the
  467. groups that each register is a member of; and the command <code>maint
  468. print remote-registers</code> includes the remote target&rsquo;s register numbers
  469. and offsets in the &lsquo;G&rsquo; packets.
  470. </p>
  471. <p>These commands take an optional parameter, a file name to which to
  472. write the information.
  473. </p>
  474. <a name="index-maint-print-reggroups"></a>
  475. </dd>
  476. <dt><code>maint print reggroups <span class="roman">[</span><var>file</var><span class="roman">]</span></code></dt>
  477. <dd><p>Print <small>GDB</small>&rsquo;s internal register group data structures. The
  478. optional argument <var>file</var> tells to what file to write the
  479. information.
  480. </p>
  481. <p>The register groups info looks like this:
  482. </p>
  483. <div class="smallexample">
  484. <pre class="smallexample">(gdb) <kbd>maint print reggroups</kbd>
  485. Group Type
  486. general user
  487. float user
  488. all user
  489. vector user
  490. system user
  491. save internal
  492. restore internal
  493. </pre></div>
  494. <a name="index-flushregs"></a>
  495. </dd>
  496. <dt><code>flushregs</code></dt>
  497. <dd><p>This command forces <small>GDB</small> to flush its internal register cache.
  498. </p>
  499. <a name="index-maint-print-objfiles"></a>
  500. <a name="index-info-for-known-object-files"></a>
  501. </dd>
  502. <dt><code>maint print objfiles <span class="roman">[</span><var>regexp</var><span class="roman">]</span></code></dt>
  503. <dd><p>Print a dump of all known object files.
  504. If <var>regexp</var> is specified, only print object files whose names
  505. match <var>regexp</var>. For each object file, this command prints its name,
  506. address in memory, and all of its psymtabs and symtabs.
  507. </p>
  508. <a name="index-maint-print-user_002dregisters"></a>
  509. <a name="index-user-registers"></a>
  510. </dd>
  511. <dt><code>maint print user-registers</code></dt>
  512. <dd><p>List all currently available <em>user registers</em>. User registers
  513. typically provide alternate names for actual hardware registers. They
  514. include the four &ldquo;standard&rdquo; registers <code>$fp</code>, <code>$pc</code>,
  515. <code>$sp</code>, and <code>$ps</code>. See <a href="Registers.html#standard-registers">standard registers</a>. User
  516. registers can be used in expressions in the same way as the canonical
  517. register names, but only the latter are listed by the <code>info
  518. registers</code> and <code>maint print registers</code> commands.
  519. </p>
  520. <a name="index-maint-print-section_002dscripts"></a>
  521. <a name="index-info-for-known-_002edebug_005fgdb_005fscripts_002dloaded-scripts"></a>
  522. </dd>
  523. <dt><code>maint print section-scripts [<var>regexp</var>]</code></dt>
  524. <dd><p>Print a dump of scripts specified in the <code>.debug_gdb_section</code> section.
  525. If <var>regexp</var> is specified, only print scripts loaded by object files
  526. matching <var>regexp</var>.
  527. For each script, this command prints its name as specified in the objfile,
  528. and the full path if known.
  529. See <a href="dotdebug_005fgdb_005fscripts-section.html#dotdebug_005fgdb_005fscripts-section">dotdebug_gdb_scripts section</a>.
  530. </p>
  531. <a name="index-maint-print-statistics"></a>
  532. <a name="index-bcache-statistics"></a>
  533. </dd>
  534. <dt><code>maint print statistics</code></dt>
  535. <dd><p>This command prints, for each object file in the program, various data
  536. about that object file followed by the byte cache (<em>bcache</em>)
  537. statistics for the object file. The objfile data includes the number
  538. of minimal, partial, full, and stabs symbols, the number of types
  539. defined by the objfile, the number of as yet unexpanded psym tables,
  540. the number of line tables and string tables, and the amount of memory
  541. used by the various tables. The bcache statistics include the counts,
  542. sizes, and counts of duplicates of all and unique objects, max,
  543. average, and median entry size, total memory used and its overhead and
  544. savings, and various measures of the hash table size and chain
  545. lengths.
  546. </p>
  547. <a name="index-maint-print-target_002dstack"></a>
  548. <a name="index-target-stack-description"></a>
  549. </dd>
  550. <dt><code>maint print target-stack</code></dt>
  551. <dd><p>A <em>target</em> is an interface between the debugger and a particular
  552. kind of file or process. Targets can be stacked in <em>strata</em>,
  553. so that more than one target can potentially respond to a request.
  554. In particular, memory accesses will walk down the stack of targets
  555. until they find a target that is interested in handling that particular
  556. address.
  557. </p>
  558. <p>This command prints a short description of each layer that was pushed on
  559. the <em>target stack</em>, starting from the top layer down to the bottom one.
  560. </p>
  561. <a name="index-maint-print-type"></a>
  562. <a name="index-type-chain-of-a-data-type"></a>
  563. </dd>
  564. <dt><code>maint print type <var>expr</var></code></dt>
  565. <dd><p>Print the type chain for a type specified by <var>expr</var>. The argument
  566. can be either a type name or a symbol. If it is a symbol, the type of
  567. that symbol is described. The type chain produced by this command is
  568. a recursive definition of the data type as stored in <small>GDB</small>&rsquo;s
  569. data structures, including its flags and contained types.
  570. </p>
  571. <a name="index-maint-selftest"></a>
  572. <a name="index-self-tests"></a>
  573. </dd>
  574. <dt><code>maint selftest <span class="roman">[</span><var>filter</var><span class="roman">]</span></code></dt>
  575. <dd><p>Run any self tests that were compiled in to <small>GDB</small>. This will
  576. print a message showing how many tests were run, and how many failed.
  577. If a <var>filter</var> is passed, only the tests with <var>filter</var> in their
  578. name will by ran.
  579. </p>
  580. <a name="index-maint-info-selftests"></a>
  581. <a name="index-self-tests-1"></a>
  582. </dd>
  583. <dt><code>maint info selftests</code></dt>
  584. <dd><p>List the selftests compiled in to <small>GDB</small>.
  585. </p>
  586. <a name="index-maint-set-dwarf-always_002ddisassemble"></a>
  587. <a name="index-maint-show-dwarf-always_002ddisassemble"></a>
  588. </dd>
  589. <dt><code>maint set dwarf always-disassemble</code></dt>
  590. <dt><code>maint show dwarf always-disassemble</code></dt>
  591. <dd><p>Control the behavior of <code>info address</code> when using DWARF debugging
  592. information.
  593. </p>
  594. <p>The default is <code>off</code>, which means that <small>GDB</small> should try to
  595. describe a variable&rsquo;s location in an easily readable format. When
  596. <code>on</code>, <small>GDB</small> will instead display the DWARF location
  597. expression in an assembly-like format. Note that some locations are
  598. too complex for <small>GDB</small> to describe simply; in this case you will
  599. always see the disassembly form.
  600. </p>
  601. <p>Here is an example of the resulting disassembly:
  602. </p>
  603. <div class="smallexample">
  604. <pre class="smallexample">(gdb) info addr argc
  605. Symbol &quot;argc&quot; is a complex DWARF expression:
  606. 1: DW_OP_fbreg 0
  607. </pre></div>
  608. <p>For more information on these expressions, see
  609. <a href="http://www.dwarfstd.org/">the DWARF standard</a>.
  610. </p>
  611. <a name="index-maint-set-dwarf-max_002dcache_002dage"></a>
  612. <a name="index-maint-show-dwarf-max_002dcache_002dage"></a>
  613. </dd>
  614. <dt><code>maint set dwarf max-cache-age</code></dt>
  615. <dt><code>maint show dwarf max-cache-age</code></dt>
  616. <dd><p>Control the DWARF compilation unit cache.
  617. </p>
  618. <a name="index-DWARF-compilation-units-cache"></a>
  619. <p>In object files with inter-compilation-unit references, such as those
  620. produced by the GCC option &lsquo;<samp>-feliminate-dwarf2-dups</samp>&rsquo;, the DWARF
  621. reader needs to frequently refer to previously read compilation units.
  622. This setting controls how long a compilation unit will remain in the
  623. cache if it is not referenced. A higher limit means that cached
  624. compilation units will be stored in memory longer, and more total
  625. memory will be used. Setting it to zero disables caching, which will
  626. slow down <small>GDB</small> startup, but reduce memory consumption.
  627. </p>
  628. <a name="index-maint-set-dwarf-unwinders"></a>
  629. <a name="index-maint-show-dwarf-unwinders"></a>
  630. </dd>
  631. <dt><code>maint set dwarf unwinders</code></dt>
  632. <dt><code>maint show dwarf unwinders</code></dt>
  633. <dd><p>Control use of the DWARF frame unwinders.
  634. </p>
  635. <a name="index-DWARF-frame-unwinders"></a>
  636. <p>Many targets that support DWARF debugging use <small>GDB</small>&rsquo;s DWARF
  637. frame unwinders to build the backtrace. Many of these targets will
  638. also have a second mechanism for building the backtrace for use in
  639. cases where DWARF information is not available, this second mechanism
  640. is often an analysis of a function&rsquo;s prologue.
  641. </p>
  642. <p>In order to extend testing coverage of the second level stack
  643. unwinding mechanisms it is helpful to be able to disable the DWARF
  644. stack unwinders, this can be done with this switch.
  645. </p>
  646. <p>In normal use of <small>GDB</small> disabling the DWARF unwinders is not
  647. advisable, there are cases that are better handled through DWARF than
  648. prologue analysis, and the debug experience is likely to be better
  649. with the DWARF frame unwinders enabled.
  650. </p>
  651. <p>If DWARF frame unwinders are not supported for a particular target
  652. architecture, then enabling this flag does not cause them to be used.
  653. </p>
  654. <a name="index-maint-set-worker_002dthreads"></a>
  655. <a name="index-maint-show-worker_002dthreads"></a>
  656. </dd>
  657. <dt><code>maint set worker-threads</code></dt>
  658. <dt><code>maint show worker-threads</code></dt>
  659. <dd><p>Control the number of worker threads that may be used by <small>GDB</small>.
  660. On capable hosts, <small>GDB</small> may use multiple threads to speed up
  661. certain CPU-intensive operations, such as demangling symbol names.
  662. While the number of threads used by <small>GDB</small> may vary, this
  663. command can be used to set an upper bound on this number. The default
  664. is <code>unlimited</code>, which lets <small>GDB</small> choose a reasonable
  665. number. Note that this only controls worker threads started by
  666. <small>GDB</small> itself; libraries used by <small>GDB</small> may start threads
  667. of their own.
  668. </p>
  669. <a name="index-maint-set-profile"></a>
  670. <a name="index-maint-show-profile"></a>
  671. <a name="index-profiling-GDB"></a>
  672. </dd>
  673. <dt><code>maint set profile</code></dt>
  674. <dt><code>maint show profile</code></dt>
  675. <dd><p>Control profiling of <small>GDB</small>.
  676. </p>
  677. <p>Profiling will be disabled until you use the &lsquo;<samp>maint set profile</samp>&rsquo;
  678. command to enable it. When you enable profiling, the system will begin
  679. collecting timing and execution count data; when you disable profiling or
  680. exit <small>GDB</small>, the results will be written to a log file. Remember that
  681. if you use profiling, <small>GDB</small> will overwrite the profiling log file
  682. (often called <samp>gmon.out</samp>). If you have a record of important profiling
  683. data in a <samp>gmon.out</samp> file, be sure to move it to a safe location.
  684. </p>
  685. <p>Configuring with &lsquo;<samp>--enable-profiling</samp>&rsquo; arranges for <small>GDB</small> to be
  686. compiled with the &lsquo;<samp>-pg</samp>&rsquo; compiler option.
  687. </p>
  688. <a name="index-maint-set-show_002ddebug_002dregs"></a>
  689. <a name="index-maint-show-show_002ddebug_002dregs"></a>
  690. <a name="index-hardware-debug-registers"></a>
  691. </dd>
  692. <dt><code>maint set show-debug-regs</code></dt>
  693. <dt><code>maint show show-debug-regs</code></dt>
  694. <dd><p>Control whether to show variables that mirror the hardware debug
  695. registers. Use <code>on</code> to enable, <code>off</code> to disable. If
  696. enabled, the debug registers values are shown when <small>GDB</small> inserts or
  697. removes a hardware breakpoint or watchpoint, and when the inferior
  698. triggers a hardware-assisted breakpoint or watchpoint.
  699. </p>
  700. <a name="index-maint-set-show_002dall_002dtib"></a>
  701. <a name="index-maint-show-show_002dall_002dtib"></a>
  702. </dd>
  703. <dt><code>maint set show-all-tib</code></dt>
  704. <dt><code>maint show show-all-tib</code></dt>
  705. <dd><p>Control whether to show all non zero areas within a 1k block starting
  706. at thread local base, when using the &lsquo;<samp>info w32 thread-information-block</samp>&rsquo;
  707. command.
  708. </p>
  709. <a name="index-maint-set-target_002dasync"></a>
  710. <a name="index-maint-show-target_002dasync"></a>
  711. </dd>
  712. <dt><code>maint set target-async</code></dt>
  713. <dt><code>maint show target-async</code></dt>
  714. <dd><p>This controls whether <small>GDB</small> targets operate in synchronous or
  715. asynchronous mode (see <a href="Background-Execution.html#Background-Execution">Background Execution</a>). Normally the
  716. default is asynchronous, if it is available; but this can be changed
  717. to more easily debug problems occurring only in synchronous mode.
  718. </p>
  719. <a name="index-maint-set-target_002dnon_002dstop-mode-_005bon_007coff_007cauto_005d"></a>
  720. <a name="index-maint-show-target_002dnon_002dstop"></a>
  721. </dd>
  722. <dt><code>maint set target-non-stop</code></dt>
  723. <dt><code>maint show target-non-stop</code></dt>
  724. <dd>
  725. <p>This controls whether <small>GDB</small> targets always operate in non-stop
  726. mode even if <code>set non-stop</code> is <code>off</code> (see <a href="Non_002dStop-Mode.html#Non_002dStop-Mode">Non-Stop Mode</a>). The default is <code>auto</code>, meaning non-stop mode is enabled
  727. if supported by the target.
  728. </p>
  729. <dl compact="compact">
  730. <dt><code>maint set target-non-stop auto</code></dt>
  731. <dd><p>This is the default mode. <small>GDB</small> controls the target in
  732. non-stop mode if the target supports it.
  733. </p>
  734. </dd>
  735. <dt><code>maint set target-non-stop on</code></dt>
  736. <dd><p><small>GDB</small> controls the target in non-stop mode even if the target
  737. does not indicate support.
  738. </p>
  739. </dd>
  740. <dt><code>maint set target-non-stop off</code></dt>
  741. <dd><p><small>GDB</small> does not control the target in non-stop mode even if the
  742. target supports it.
  743. </p></dd>
  744. </dl>
  745. <a name="index-maint-set-tui_002dresize_002dmessage"></a>
  746. <a name="index-maint-show-tui_002dresize_002dmessage"></a>
  747. </dd>
  748. <dt><code>maint set tui-resize-message</code></dt>
  749. <dt><code>maint show tui-resize-message</code></dt>
  750. <dd><p>Control whether <small>GDB</small> displays a message each time the terminal
  751. is resized when in TUI mode. The default is <code>off</code>, which means
  752. that <small>GDB</small> is silent during resizes. When <code>on</code>,
  753. <small>GDB</small> will display a message after a resize is completed; the
  754. message will include a number indicating how many times the terminal
  755. has been resized. This setting is intended for use by the test suite,
  756. where it would otherwise be difficult to determine when a resize and
  757. refresh has been completed.
  758. </p>
  759. <a name="index-maint-set-per_002dcommand"></a>
  760. <a name="index-maint-show-per_002dcommand"></a>
  761. </dd>
  762. <dt><code>maint set per-command</code></dt>
  763. <dt><code>maint show per-command</code></dt>
  764. <dd><a name="index-resources-used-by-commands"></a>
  765. <p><small>GDB</small> can display the resources used by each command.
  766. This is useful in debugging performance problems.
  767. </p>
  768. <dl compact="compact">
  769. <dt><code>maint set per-command space [on|off]</code></dt>
  770. <dt><code>maint show per-command space</code></dt>
  771. <dd><p>Enable or disable the printing of the memory used by GDB for each command.
  772. If enabled, <small>GDB</small> will display how much memory each command
  773. took, following the command&rsquo;s own output.
  774. This can also be requested by invoking <small>GDB</small> with the
  775. <samp>--statistics</samp> command-line switch (see <a href="Mode-Options.html#Mode-Options">Mode Options</a>).
  776. </p>
  777. </dd>
  778. <dt><code>maint set per-command time [on|off]</code></dt>
  779. <dt><code>maint show per-command time</code></dt>
  780. <dd><p>Enable or disable the printing of the execution time of <small>GDB</small>
  781. for each command.
  782. If enabled, <small>GDB</small> will display how much time it
  783. took to execute each command, following the command&rsquo;s own output.
  784. Both CPU time and wallclock time are printed.
  785. Printing both is useful when trying to determine whether the cost is
  786. CPU or, e.g., disk/network latency.
  787. Note that the CPU time printed is for <small>GDB</small> only, it does not include
  788. the execution time of the inferior because there&rsquo;s no mechanism currently
  789. to compute how much time was spent by <small>GDB</small> and how much time was
  790. spent by the program been debugged.
  791. This can also be requested by invoking <small>GDB</small> with the
  792. <samp>--statistics</samp> command-line switch (see <a href="Mode-Options.html#Mode-Options">Mode Options</a>).
  793. </p>
  794. </dd>
  795. <dt><code>maint set per-command symtab [on|off]</code></dt>
  796. <dt><code>maint show per-command symtab</code></dt>
  797. <dd><p>Enable or disable the printing of basic symbol table statistics
  798. for each command.
  799. If enabled, <small>GDB</small> will display the following information:
  800. </p>
  801. <ol>
  802. <li> number of symbol tables
  803. </li><li> number of primary symbol tables
  804. </li><li> number of blocks in the blockvector
  805. </li></ol>
  806. </dd>
  807. </dl>
  808. <a name="index-maint-set-check_002dlibthread_002ddb"></a>
  809. <a name="index-maint-show-check_002dlibthread_002ddb"></a>
  810. </dd>
  811. <dt><code>maint set check-libthread-db [on|off]</code></dt>
  812. <dt><code>maint show check-libthread-db</code></dt>
  813. <dd><p>Control whether <small>GDB</small> should run integrity checks on inferior
  814. specific thread debugging libraries as they are loaded. The default
  815. is not to perform such checks. If any check fails <small>GDB</small> will
  816. unload the library and continue searching for a suitable candidate as
  817. described in <a href="Threads.html#set-libthread_002ddb_002dsearch_002dpath">set libthread-db-search-path</a>. For more information
  818. about the tests, see <a href="#maint-check-libthread_002ddb">maint check libthread-db</a>.
  819. </p>
  820. <a name="index-maint-space"></a>
  821. <a name="index-memory-used-by-commands"></a>
  822. </dd>
  823. <dt><code>maint space <var>value</var></code></dt>
  824. <dd><p>An alias for <code>maint set per-command space</code>.
  825. A non-zero value enables it, zero disables it.
  826. </p>
  827. <a name="index-maint-time"></a>
  828. <a name="index-time-of-command-execution"></a>
  829. </dd>
  830. <dt><code>maint time <var>value</var></code></dt>
  831. <dd><p>An alias for <code>maint set per-command time</code>.
  832. A non-zero value enables it, zero disables it.
  833. </p>
  834. <a name="index-maint-translate_002daddress"></a>
  835. </dd>
  836. <dt><code>maint translate-address <span class="roman">[</span><var>section</var><span class="roman">]</span> <var>addr</var></code></dt>
  837. <dd><p>Find the symbol stored at the location specified by the address
  838. <var>addr</var> and an optional section name <var>section</var>. If found,
  839. <small>GDB</small> prints the name of the closest symbol and an offset from
  840. the symbol&rsquo;s location to the specified address. This is similar to
  841. the <code>info address</code> command (see <a href="Symbols.html#Symbols">Symbols</a>), except that this
  842. command also allows to find symbols in other sections.
  843. </p>
  844. <p>If section was not specified, the section in which the symbol was found
  845. is also printed. For dynamically linked executables, the name of
  846. executable or shared library containing the symbol is printed as well.
  847. </p>
  848. <a name="index-maint-test_002doptions"></a>
  849. </dd>
  850. <dt><code>maint test-options require-delimiter</code></dt>
  851. <dt><code>maint test-options unknown-is-error</code></dt>
  852. <dt><code>maint test-options unknown-is-operand</code></dt>
  853. <dd><p>These commands are used by the testsuite to validate the command
  854. options framework. The <code>require-delimiter</code> variant requires a
  855. double-dash delimiter to indicate end of options. The
  856. <code>unknown-is-error</code> and <code>unknown-is-operand</code> do not. The
  857. <code>unknown-is-error</code> variant throws an error on unknown option,
  858. while <code>unknown-is-operand</code> treats unknown options as the start of
  859. the command&rsquo;s operands. When run, the commands output the result of
  860. the processed options. When completed, the commands store the
  861. internal result of completion in a variable exposed by the <code>maint
  862. show test-options-completion-result</code> command.
  863. </p>
  864. <a name="index-maint-show-test_002doptions_002dcompletion_002dresult"></a>
  865. </dd>
  866. <dt><code>maint show test-options-completion-result</code></dt>
  867. <dd><p>Shows the result of completing the <code>maint test-options</code>
  868. subcommands. This is used by the testsuite to validate completion
  869. support in the command options framework.
  870. </p>
  871. <a name="index-maint-set-test_002dsettings"></a>
  872. <a name="index-maint-show-test_002dsettings"></a>
  873. </dd>
  874. <dt><code>maint set test-settings <var>kind</var></code></dt>
  875. <dt><code>maint show test-settings <var>kind</var></code></dt>
  876. <dd><p>These are representative commands for each <var>kind</var> of setting type
  877. <small>GDB</small> supports. They are used by the testsuite for exercising
  878. the settings infrastructure.
  879. </p>
  880. <a name="index-maint-with"></a>
  881. </dd>
  882. <dt><code>maint with <var>setting</var> [<var>value</var>] [-- <var>command</var>]</code></dt>
  883. <dd><p>Like the <code>with</code> command, but works with <code>maintenance set</code>
  884. variables. This is used by the testsuite to exercise the <code>with</code>
  885. command&rsquo;s infrastructure.
  886. </p>
  887. </dd>
  888. </dl>
  889. <p>The following command is useful for non-interactive invocations of
  890. <small>GDB</small>, such as in the test suite.
  891. </p>
  892. <dl compact="compact">
  893. <dt><code>set watchdog <var>nsec</var></code></dt>
  894. <dd><a name="index-set-watchdog"></a>
  895. <a name="index-watchdog-timer"></a>
  896. <a name="index-timeout-for-commands"></a>
  897. <p>Set the maximum number of seconds <small>GDB</small> will wait for the
  898. target operation to finish. If this time expires, <small>GDB</small>
  899. reports and error and the command is aborted.
  900. </p>
  901. </dd>
  902. <dt><code>show watchdog</code></dt>
  903. <dd><p>Show the current setting of the target wait timeout.
  904. </p></dd>
  905. </dl>
  906. <hr>
  907. <div class="header">
  908. <p>
  909. Next: <a href="Remote-Protocol.html#Remote-Protocol" accesskey="n" rel="next">Remote Protocol</a>, Previous: <a href="Installing-GDB.html#Installing-GDB" accesskey="p" rel="previous">Installing GDB</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  910. </div>
  911. </body>
  912. </html>