Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Maintenance-Commands.html 43KB

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