You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
7.7KB

  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>Messages/Warnings (Debugging with GDB)</title>
  17. <meta name="description" content="Messages/Warnings (Debugging with GDB)">
  18. <meta name="keywords" content="Messages/Warnings (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="Controlling-GDB.html#Controlling-GDB" rel="up" title="Controlling GDB">
  26. <link href="Debugging-Output.html#Debugging-Output" rel="next" title="Debugging Output">
  27. <link href="Auto_002dloading-verbose-mode.html#Auto_002dloading-verbose-mode" rel="prev" title="Auto-loading verbose mode">
  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="Messages_002fWarnings"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Debugging-Output.html#Debugging-Output" accesskey="n" rel="next">Debugging Output</a>, Previous: <a href="Auto_002dloading.html#Auto_002dloading" accesskey="p" rel="prev">Auto-loading</a>, Up: <a href="Controlling-GDB.html#Controlling-GDB" accesskey="u" rel="up">Controlling GDB</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="Optional-Warnings-and-Messages"></a>
  64. <h3 class="section">22.9 Optional Warnings and Messages</h3>
  65. <a name="index-verbose-operation"></a>
  66. <a name="index-optional-warnings"></a>
  67. <p>By default, <small>GDB</small> is silent about its inner workings. If you are
  68. running on a slow machine, you may want to use the <code>set verbose</code>
  69. command. This makes <small>GDB</small> tell you when it does a lengthy
  70. internal operation, so you will not think it has crashed.
  71. </p>
  72. <p>Currently, the messages controlled by <code>set verbose</code> are those
  73. which announce that the symbol table for a source file is being read;
  74. see <code>symbol-file</code> in <a href="Files.html#Files">Commands to Specify Files</a>.
  75. </p>
  76. <dl compact="compact">
  77. <dd><a name="index-set-verbose"></a>
  78. </dd>
  79. <dt><code>set verbose on</code></dt>
  80. <dd><p>Enables <small>GDB</small> output of certain informational messages.
  81. </p>
  82. </dd>
  83. <dt><code>set verbose off</code></dt>
  84. <dd><p>Disables <small>GDB</small> output of certain informational messages.
  85. </p>
  86. <a name="index-show-verbose"></a>
  87. </dd>
  88. <dt><code>show verbose</code></dt>
  89. <dd><p>Displays whether <code>set verbose</code> is on or off.
  90. </p></dd>
  91. </dl>
  92. <p>By default, if <small>GDB</small> encounters bugs in the symbol table of an
  93. object file, it is silent; but if you are debugging a compiler, you may
  94. find this information useful (see <a href="Symbol-Errors.html#Symbol-Errors">Errors Reading
  95. Symbol Files</a>).
  96. </p>
  97. <dl compact="compact">
  98. <dd>
  99. <a name="index-set-complaints"></a>
  100. </dd>
  101. <dt><code>set complaints <var>limit</var></code></dt>
  102. <dd><p>Permits <small>GDB</small> to output <var>limit</var> complaints about each type of
  103. unusual symbols before becoming silent about the problem. Set
  104. <var>limit</var> to zero to suppress all complaints; set it to a large number
  105. to prevent complaints from being suppressed.
  106. </p>
  107. <a name="index-show-complaints"></a>
  108. </dd>
  109. <dt><code>show complaints</code></dt>
  110. <dd><p>Displays how many symbol complaints <small>GDB</small> is permitted to produce.
  111. </p>
  112. </dd>
  113. </dl>
  114. <a name="confirmation-requests"></a><p>By default, <small>GDB</small> is cautious, and asks what sometimes seems to be a
  115. lot of stupid questions to confirm certain commands. For example, if
  116. you try to run a program which is already running:
  117. </p>
  118. <div class="smallexample">
  119. <pre class="smallexample">(gdb) run
  120. The program being debugged has been started already.
  121. Start it from the beginning? (y or n)
  122. </pre></div>
  123. <p>If you are willing to unflinchingly face the consequences of your own
  124. commands, you can disable this &ldquo;feature&rdquo;:
  125. </p>
  126. <dl compact="compact">
  127. <dd>
  128. <a name="index-set-confirm"></a>
  129. <a name="index-flinching"></a>
  130. <a name="index-confirmation"></a>
  131. <a name="index-stupid-questions"></a>
  132. </dd>
  133. <dt><code>set confirm off</code></dt>
  134. <dd><p>Disables confirmation requests. Note that running <small>GDB</small> with
  135. the <samp>--batch</samp> option (see <a href="Mode-Options.html#Mode-Options">-batch</a>) also
  136. automatically disables confirmation requests.
  137. </p>
  138. </dd>
  139. <dt><code>set confirm on</code></dt>
  140. <dd><p>Enables confirmation requests (the default).
  141. </p>
  142. <a name="index-show-confirm"></a>
  143. </dd>
  144. <dt><code>show confirm</code></dt>
  145. <dd><p>Displays state of confirmation requests.
  146. </p>
  147. </dd>
  148. </dl>
  149. <a name="index-command-tracing"></a>
  150. <p>If you need to debug user-defined commands or sourced files you may find it
  151. useful to enable <em>command tracing</em>. In this mode each command will be
  152. printed as it is executed, prefixed with one or more &lsquo;<samp>+</samp>&rsquo; symbols, the
  153. quantity denoting the call depth of each command.
  154. </p>
  155. <dl compact="compact">
  156. <dd><a name="index-set-trace_002dcommands"></a>
  157. <a name="index-command-scripts_002c-debugging"></a>
  158. </dd>
  159. <dt><code>set trace-commands on</code></dt>
  160. <dd><p>Enable command tracing.
  161. </p></dd>
  162. <dt><code>set trace-commands off</code></dt>
  163. <dd><p>Disable command tracing.
  164. </p></dd>
  165. <dt><code>show trace-commands</code></dt>
  166. <dd><p>Display the current state of command tracing.
  167. </p></dd>
  168. </dl>
  169. <hr>
  170. <div class="header">
  171. <p>
  172. Next: <a href="Debugging-Output.html#Debugging-Output" accesskey="n" rel="next">Debugging Output</a>, Previous: <a href="Auto_002dloading.html#Auto_002dloading" accesskey="p" rel="prev">Auto-loading</a>, Up: <a href="Controlling-GDB.html#Controlling-GDB" accesskey="u" rel="up">Controlling GDB</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>
  173. </div>
  174. </body>
  175. </html>