Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

239 Zeilen
10KB

  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>Ada Exception GDB/MI Catchpoint Commands (Debugging with GDB)</title>
  17. <meta name="description" content="Ada Exception GDB/MI Catchpoint Commands (Debugging with GDB)">
  18. <meta name="keywords" content="Ada Exception GDB/MI Catchpoint 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="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" rel="up" title="GDB/MI Catchpoint Commands">
  26. <link href="C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands.html#C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands" rel="next" title="C++ Exception GDB/MI Catchpoint Commands">
  27. <link href="Shared-Library-GDB_002fMI-Catchpoint-Commands.html#Shared-Library-GDB_002fMI-Catchpoint-Commands" rel="prev" title="Shared Library GDB/MI Catchpoint Commands">
  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="Ada-Exception-GDB_002fMI-Catchpoint-Commands"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands.html#C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands" accesskey="n" rel="next">C++ Exception GDB/MI Catchpoint Commands</a>, Previous: <a href="Shared-Library-GDB_002fMI-Catchpoint-Commands.html#Shared-Library-GDB_002fMI-Catchpoint-Commands" accesskey="p" rel="prev">Shared Library GDB/MI Catchpoint Commands</a>, Up: <a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" accesskey="u" rel="up">GDB/MI Catchpoint Commands</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="Ada-Exception-GDB_002fMI-Catchpoints"></a>
  64. <h4 class="subsection">27.9.2 Ada Exception <small>GDB/MI</small> Catchpoints</h4>
  65. <p>The following <small>GDB/MI</small> commands can be used to create catchpoints
  66. that stop the execution when Ada exceptions are being raised.
  67. </p>
  68. <a name="The-_002dcatch_002dassert-Command"></a>
  69. <h4 class="subheading">The <code>-catch-assert</code> Command</h4>
  70. <a name="index-_002dcatch_002dassert"></a>
  71. <a name="Synopsis-15"></a>
  72. <h4 class="subsubheading">Synopsis</h4>
  73. <div class="smallexample">
  74. <pre class="smallexample"> -catch-assert [ -c <var>condition</var>] [ -d ] [ -t ]
  75. </pre></div>
  76. <p>Add a catchpoint for failed Ada assertions.
  77. </p>
  78. <p>The possible optional parameters for this command are:
  79. </p>
  80. <dl compact="compact">
  81. <dt>&lsquo;<samp>-c <var>condition</var></samp>&rsquo;</dt>
  82. <dd><p>Make the catchpoint conditional on <var>condition</var>.
  83. </p></dd>
  84. <dt>&lsquo;<samp>-d</samp>&rsquo;</dt>
  85. <dd><p>Create a disabled catchpoint.
  86. </p></dd>
  87. <dt>&lsquo;<samp>-t</samp>&rsquo;</dt>
  88. <dd><p>Create a temporary catchpoint.
  89. </p></dd>
  90. </dl>
  91. <a name="GDB-Command-14"></a>
  92. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  93. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>catch assert</samp>&rsquo;.
  94. </p>
  95. <a name="Example-14"></a>
  96. <h4 class="subsubheading">Example</h4>
  97. <div class="smallexample">
  98. <pre class="smallexample">-catch-assert
  99. ^done,bkptno=&quot;5&quot;,bkpt={number=&quot;5&quot;,type=&quot;breakpoint&quot;,disp=&quot;keep&quot;,
  100. enabled=&quot;y&quot;,addr=&quot;0x0000000000404888&quot;,what=&quot;failed Ada assertions&quot;,
  101. thread-groups=[&quot;i1&quot;],times=&quot;0&quot;,
  102. original-location=&quot;__gnat_debug_raise_assert_failure&quot;}
  103. (gdb)
  104. </pre></div>
  105. <a name="The-_002dcatch_002dexception-Command"></a>
  106. <h4 class="subheading">The <code>-catch-exception</code> Command</h4>
  107. <a name="index-_002dcatch_002dexception"></a>
  108. <a name="Synopsis-16"></a>
  109. <h4 class="subsubheading">Synopsis</h4>
  110. <div class="smallexample">
  111. <pre class="smallexample"> -catch-exception [ -c <var>condition</var>] [ -d ] [ -e <var>exception-name</var> ]
  112. [ -t ] [ -u ]
  113. </pre></div>
  114. <p>Add a catchpoint stopping when Ada exceptions are raised.
  115. By default, the command stops the program when any Ada exception
  116. gets raised. But it is also possible, by using some of the
  117. optional parameters described below, to create more selective
  118. catchpoints.
  119. </p>
  120. <p>The possible optional parameters for this command are:
  121. </p>
  122. <dl compact="compact">
  123. <dt>&lsquo;<samp>-c <var>condition</var></samp>&rsquo;</dt>
  124. <dd><p>Make the catchpoint conditional on <var>condition</var>.
  125. </p></dd>
  126. <dt>&lsquo;<samp>-d</samp>&rsquo;</dt>
  127. <dd><p>Create a disabled catchpoint.
  128. </p></dd>
  129. <dt>&lsquo;<samp>-e <var>exception-name</var></samp>&rsquo;</dt>
  130. <dd><p>Only stop when <var>exception-name</var> is raised. This option cannot
  131. be used combined with &lsquo;<samp>-u</samp>&rsquo;.
  132. </p></dd>
  133. <dt>&lsquo;<samp>-t</samp>&rsquo;</dt>
  134. <dd><p>Create a temporary catchpoint.
  135. </p></dd>
  136. <dt>&lsquo;<samp>-u</samp>&rsquo;</dt>
  137. <dd><p>Stop only when an unhandled exception gets raised. This option
  138. cannot be used combined with &lsquo;<samp>-e</samp>&rsquo;.
  139. </p></dd>
  140. </dl>
  141. <a name="GDB-Command-15"></a>
  142. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  143. <p>The corresponding <small>GDB</small> commands are &lsquo;<samp>catch exception</samp>&rsquo;
  144. and &lsquo;<samp>catch exception unhandled</samp>&rsquo;.
  145. </p>
  146. <a name="Example-15"></a>
  147. <h4 class="subsubheading">Example</h4>
  148. <div class="smallexample">
  149. <pre class="smallexample">-catch-exception -e Program_Error
  150. ^done,bkptno=&quot;4&quot;,bkpt={number=&quot;4&quot;,type=&quot;breakpoint&quot;,disp=&quot;keep&quot;,
  151. enabled=&quot;y&quot;,addr=&quot;0x0000000000404874&quot;,
  152. what=&quot;`Program_Error' Ada exception&quot;, thread-groups=[&quot;i1&quot;],
  153. times=&quot;0&quot;,original-location=&quot;__gnat_debug_raise_exception&quot;}
  154. (gdb)
  155. </pre></div>
  156. <a name="The-_002dcatch_002dhandlers-Command"></a>
  157. <h4 class="subheading">The <code>-catch-handlers</code> Command</h4>
  158. <a name="index-_002dcatch_002dhandlers"></a>
  159. <a name="Synopsis-17"></a>
  160. <h4 class="subsubheading">Synopsis</h4>
  161. <div class="smallexample">
  162. <pre class="smallexample"> -catch-handlers [ -c <var>condition</var>] [ -d ] [ -e <var>exception-name</var> ]
  163. [ -t ]
  164. </pre></div>
  165. <p>Add a catchpoint stopping when Ada exceptions are handled.
  166. By default, the command stops the program when any Ada exception
  167. gets handled. But it is also possible, by using some of the
  168. optional parameters described below, to create more selective
  169. catchpoints.
  170. </p>
  171. <p>The possible optional parameters for this command are:
  172. </p>
  173. <dl compact="compact">
  174. <dt>&lsquo;<samp>-c <var>condition</var></samp>&rsquo;</dt>
  175. <dd><p>Make the catchpoint conditional on <var>condition</var>.
  176. </p></dd>
  177. <dt>&lsquo;<samp>-d</samp>&rsquo;</dt>
  178. <dd><p>Create a disabled catchpoint.
  179. </p></dd>
  180. <dt>&lsquo;<samp>-e <var>exception-name</var></samp>&rsquo;</dt>
  181. <dd><p>Only stop when <var>exception-name</var> is handled.
  182. </p></dd>
  183. <dt>&lsquo;<samp>-t</samp>&rsquo;</dt>
  184. <dd><p>Create a temporary catchpoint.
  185. </p></dd>
  186. </dl>
  187. <a name="GDB-Command-16"></a>
  188. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  189. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>catch handlers</samp>&rsquo;.
  190. </p>
  191. <a name="Example-16"></a>
  192. <h4 class="subsubheading">Example</h4>
  193. <div class="smallexample">
  194. <pre class="smallexample">-catch-handlers -e Constraint_Error
  195. ^done,bkptno=&quot;4&quot;,bkpt={number=&quot;4&quot;,type=&quot;breakpoint&quot;,disp=&quot;keep&quot;,
  196. enabled=&quot;y&quot;,addr=&quot;0x0000000000402f68&quot;,
  197. what=&quot;`Constraint_Error' Ada exception handlers&quot;,thread-groups=[&quot;i1&quot;],
  198. times=&quot;0&quot;,original-location=&quot;__gnat_begin_handler&quot;}
  199. (gdb)
  200. </pre></div>
  201. <hr>
  202. <div class="header">
  203. <p>
  204. Next: <a href="C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands.html#C_002b_002b-Exception-GDB_002fMI-Catchpoint-Commands" accesskey="n" rel="next">C++ Exception GDB/MI Catchpoint Commands</a>, Previous: <a href="Shared-Library-GDB_002fMI-Catchpoint-Commands.html#Shared-Library-GDB_002fMI-Catchpoint-Commands" accesskey="p" rel="prev">Shared Library GDB/MI Catchpoint Commands</a>, Up: <a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" accesskey="u" rel="up">GDB/MI Catchpoint Commands</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>
  205. </div>
  206. </body>
  207. </html>