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.

GDB_002fMI.html 16KB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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>GDB/MI (Debugging with GDB)</title>
  17. <meta name="description" content="GDB/MI (Debugging with GDB)">
  18. <meta name="keywords" content="GDB/MI (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="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" rel="next" title="GDB/MI General Design">
  27. <link href="Emacs.html#Emacs" rel="prev" title="Emacs">
  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="GDB_002fMI"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Annotations.html#Annotations" accesskey="n" rel="next">Annotations</a>, Previous: <a href="Emacs.html#Emacs" accesskey="p" rel="prev">Emacs</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="The-GDB_002fMI-Interface"></a>
  64. <h2 class="chapter">27 The <small>GDB/MI</small> Interface</h2>
  65. <table class="menu" border="0" cellspacing="0">
  66. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" accesskey="1">GDB/MI General Design</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  67. </td></tr>
  68. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" accesskey="2">GDB/MI Command Syntax</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  69. </td></tr>
  70. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" accesskey="3">GDB/MI Compatibility with CLI</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  71. </td></tr>
  72. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Development-and-Front-Ends.html#GDB_002fMI-Development-and-Front-Ends" accesskey="4">GDB/MI Development and Front Ends</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  73. </td></tr>
  74. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="5">GDB/MI Output Records</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  75. </td></tr>
  76. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Simple-Examples.html#GDB_002fMI-Simple-Examples" accesskey="6">GDB/MI Simple Examples</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  77. </td></tr>
  78. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Command-Description-Format.html#GDB_002fMI-Command-Description-Format" accesskey="7">GDB/MI Command Description Format</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  79. </td></tr>
  80. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Breakpoint-Commands.html#GDB_002fMI-Breakpoint-Commands" accesskey="8">GDB/MI Breakpoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  81. </td></tr>
  82. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" accesskey="9">GDB/MI Catchpoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  83. </td></tr>
  84. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Program-Context.html#GDB_002fMI-Program-Context">GDB/MI Program Context</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  85. </td></tr>
  86. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Thread-Commands.html#GDB_002fMI-Thread-Commands">GDB/MI Thread Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  87. </td></tr>
  88. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands">GDB/MI Ada Tasking Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  89. </td></tr>
  90. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution">GDB/MI Program Execution</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  91. </td></tr>
  92. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation">GDB/MI Stack Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  93. </td></tr>
  94. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects">GDB/MI Variable Objects</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  95. </td></tr>
  96. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation">GDB/MI Data Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  97. </td></tr>
  98. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands">GDB/MI Tracepoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  99. </td></tr>
  100. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query">GDB/MI Symbol Query</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  101. </td></tr>
  102. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands">GDB/MI File Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  103. </td></tr>
  104. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation">GDB/MI Target Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  105. </td></tr>
  106. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-File-Transfer-Commands.html#GDB_002fMI-File-Transfer-Commands">GDB/MI File Transfer Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  107. </td></tr>
  108. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Ada-Exceptions-Commands.html#GDB_002fMI-Ada-Exceptions-Commands">GDB/MI Ada Exceptions Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  109. </td></tr>
  110. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Support-Commands.html#GDB_002fMI-Support-Commands">GDB/MI Support Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  111. </td></tr>
  112. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands">GDB/MI Miscellaneous Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  113. </td></tr>
  114. </table>
  115. <a name="Function-and-Purpose"></a>
  116. <h3 class="unnumberedsec">Function and Purpose</h3>
  117. <a name="index-GDB_002fMI_002c-its-purpose"></a>
  118. <p><small>GDB/MI</small> is a line based machine oriented text interface to
  119. <small>GDB</small> and is activated by specifying using the
  120. <samp>--interpreter</samp> command line option (see <a href="Mode-Options.html#Mode-Options">Mode Options</a>). It
  121. is specifically intended to support the development of systems which
  122. use the debugger as just one small component of a larger system.
  123. </p>
  124. <p>This chapter is a specification of the <small>GDB/MI</small> interface. It is written
  125. in the form of a reference manual.
  126. </p>
  127. <p>Note that <small>GDB/MI</small> is still under construction, so some of the
  128. features described below are incomplete and subject to change
  129. (see <a href="GDB_002fMI-Development-and-Front-Ends.html#GDB_002fMI-Development-and-Front-Ends"><small>GDB/MI</small> Development and Front Ends</a>).
  130. </p>
  131. <a name="Notation-and-Terminology"></a>
  132. <h3 class="unnumberedsec">Notation and Terminology</h3>
  133. <a name="index-notational-conventions_002c-for-GDB_002fMI"></a>
  134. <p>This chapter uses the following notation:
  135. </p>
  136. <ul>
  137. <li> <code>|</code> separates two alternatives.
  138. </li><li> <code>[ <var>something</var> ]</code> indicates that <var>something</var> is optional:
  139. it may or may not be given.
  140. </li><li> <code>( <var>group</var> )*</code> means that <var>group</var> inside the parentheses
  141. may repeat zero or more times.
  142. </li><li> <code>( <var>group</var> )+</code> means that <var>group</var> inside the parentheses
  143. may repeat one or more times.
  144. </li><li> <code>&quot;<var>string</var>&quot;</code> means a literal <var>string</var>.
  145. </li></ul>
  146. <table class="menu" border="0" cellspacing="0">
  147. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" accesskey="1">GDB/MI General Design</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  148. </td></tr>
  149. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" accesskey="2">GDB/MI Command Syntax</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  150. </td></tr>
  151. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" accesskey="3">GDB/MI Compatibility with CLI</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  152. </td></tr>
  153. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Development-and-Front-Ends.html#GDB_002fMI-Development-and-Front-Ends" accesskey="4">GDB/MI Development and Front Ends</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  154. </td></tr>
  155. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="5">GDB/MI Output Records</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  156. </td></tr>
  157. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Simple-Examples.html#GDB_002fMI-Simple-Examples" accesskey="6">GDB/MI Simple Examples</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  158. </td></tr>
  159. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Command-Description-Format.html#GDB_002fMI-Command-Description-Format" accesskey="7">GDB/MI Command Description Format</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  160. </td></tr>
  161. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Breakpoint-Commands.html#GDB_002fMI-Breakpoint-Commands" accesskey="8">GDB/MI Breakpoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  162. </td></tr>
  163. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" accesskey="9">GDB/MI Catchpoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  164. </td></tr>
  165. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Program-Context.html#GDB_002fMI-Program-Context">GDB/MI Program Context</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  166. </td></tr>
  167. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Thread-Commands.html#GDB_002fMI-Thread-Commands">GDB/MI Thread Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  168. </td></tr>
  169. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands">GDB/MI Ada Tasking Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  170. </td></tr>
  171. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution">GDB/MI Program Execution</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  172. </td></tr>
  173. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation">GDB/MI Stack Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  174. </td></tr>
  175. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects">GDB/MI Variable Objects</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  176. </td></tr>
  177. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation">GDB/MI Data Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  178. </td></tr>
  179. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands">GDB/MI Tracepoint Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  180. </td></tr>
  181. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query">GDB/MI Symbol Query</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  182. </td></tr>
  183. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands">GDB/MI File Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  184. </td></tr>
  185. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation">GDB/MI Target Manipulation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  186. </td></tr>
  187. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-File-Transfer-Commands.html#GDB_002fMI-File-Transfer-Commands">GDB/MI File Transfer Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  188. </td></tr>
  189. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Ada-Exceptions-Commands.html#GDB_002fMI-Ada-Exceptions-Commands">GDB/MI Ada Exceptions Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  190. </td></tr>
  191. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Support-Commands.html#GDB_002fMI-Support-Commands">GDB/MI Support Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  192. </td></tr>
  193. <tr><td align="left" valign="top">&bull; <a href="GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands">GDB/MI Miscellaneous Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  194. </td></tr>
  195. </table>
  196. <hr>
  197. <div class="header">
  198. <p>
  199. Next: <a href="Annotations.html#Annotations" accesskey="n" rel="next">Annotations</a>, Previous: <a href="Emacs.html#Emacs" accesskey="p" rel="prev">Emacs</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>
  200. </div>
  201. </body>
  202. </html>