Messages_002fWarnings.html 7.8 KB

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