No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

169 líneas
8.1KB

  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 Development and Front Ends (Debugging with GDB)</title>
  17. <meta name="description" content="GDB/MI Development and Front Ends (Debugging with GDB)">
  18. <meta name="keywords" content="GDB/MI Development and Front Ends (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.html#GDB_002fMI" rel="up" title="GDB/MI">
  26. <link href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" rel="next" title="GDB/MI Output Records">
  27. <link href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" rel="prev" title="GDB/MI Compatibility with CLI">
  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-Development-and-Front-Ends"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="n" rel="next">GDB/MI Output Records</a>, Previous: <a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" accesskey="p" rel="prev">GDB/MI Compatibility with CLI</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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="GDB_002fMI-Development-and-Front-Ends-1"></a>
  64. <h3 class="section">27.4 <small>GDB/MI</small> Development and Front Ends</h3>
  65. <a name="index-GDB_002fMI-development"></a>
  66. <p>The application which takes the MI output and presents the state of the
  67. program being debugged to the user is called a <em>front end</em>.
  68. </p>
  69. <p>Since <small>GDB/MI</small> is used by a variety of front ends to <small>GDB</small>, changes
  70. to the MI interface may break existing usage. This section describes how the
  71. protocol changes and how to request previous version of the protocol when it
  72. does.
  73. </p>
  74. <p>Some changes in MI need not break a carefully designed front end, and
  75. for these the MI version will remain unchanged. The following is a
  76. list of changes that may occur within one level, so front ends should
  77. parse MI output in a way that can handle them:
  78. </p>
  79. <ul>
  80. <li> New MI commands may be added.
  81. </li><li> New fields may be added to the output of any MI command.
  82. </li><li> The range of values for fields with specified values, e.g.,
  83. <code>in_scope</code> (see <a href="GDB_002fMI-Variable-Objects.html#g_t_002dvar_002dupdate">-var-update</a>) may be extended.
  84. </li></ul>
  85. <p>If the changes are likely to break front ends, the MI version level
  86. will be increased by one. The new versions of the MI protocol are not compatible
  87. with the old versions. Old versions of MI remain available, allowing front ends
  88. to keep using them until they are modified to use the latest MI version.
  89. </p>
  90. <p>Since <code>--interpreter=mi</code> always points to the latest MI version, it is
  91. recommended that front ends request a specific version of MI when launching
  92. <small>GDB</small> (e.g. <code>--interpreter=mi2</code>) to make sure they get an
  93. interpreter with the MI version they expect.
  94. </p>
  95. <p>The following table gives a summary of the released versions of the MI
  96. interface: the version number, the version of GDB in which it first appeared
  97. and the breaking changes compared to the previous version.
  98. </p>
  99. <table>
  100. <thead><tr><th width="5%">MI version</th><th width="5%">GDB version</th><th width="90%">Breaking changes</th></tr></thead>
  101. <tr><td width="5%"><div align="center">1
  102. </div></td><td width="5%"><div align="center">5.1
  103. </div></td><td width="90%">None</td></tr>
  104. <tr><td width="5%"><div align="center">2
  105. </div></td><td width="5%"><div align="center">6.0
  106. </div></td><td width="90%"><ul>
  107. <li> The <code>-environment-pwd</code>, <code>-environment-directory</code> and
  108. <code>-environment-path</code> commands now returns values using the MI output
  109. syntax, rather than CLI output syntax.
  110. </li><li> <code>-var-list-children</code>&rsquo;s <code>children</code> result field is now a list, rather
  111. than a tuple.
  112. </li><li> <code>-var-update</code>&rsquo;s <code>changelist</code> result field is now a list, rather than
  113. a tuple.
  114. </li></ul></td></tr>
  115. <tr><td width="5%"><div align="center">3
  116. </div></td><td width="5%"><div align="center">9.1
  117. </div></td><td width="90%"><ul>
  118. <li> The output of information about multi-location breakpoints has changed in the
  119. responses to the <code>-break-insert</code> and <code>-break-info</code> commands, as well
  120. as in the <code>=breakpoint-created</code> and <code>=breakpoint-modified</code> events.
  121. The multiple locations are now placed in a <code>locations</code> field, whose value
  122. is a list.
  123. </li></ul></td></tr>
  124. </table>
  125. <p>If your front end cannot yet migrate to a more recent version of the
  126. MI protocol, you can nevertheless selectively enable specific features
  127. available in those recent MI versions, using the following commands:
  128. </p>
  129. <dl compact="compact">
  130. <dt><code>-fix-multi-location-breakpoint-output</code></dt>
  131. <dd><p>Use the output for multi-location breakpoints which was introduced by
  132. MI 3, even when using MI versions 2 or 1. This command has no
  133. effect when using MI version 3 or later.
  134. </p>
  135. </dd>
  136. </dl>
  137. <p>The best way to avoid unexpected changes in MI that might break your front
  138. end is to make your project known to <small>GDB</small> developers and
  139. follow development on <a href="mailto:gdb@sourceware.org">gdb@sourceware.org</a> and
  140. <a href="mailto:gdb-patches@sourceware.org">gdb-patches@sourceware.org</a>.
  141. <a name="index-mailing-lists"></a>
  142. </p>
  143. <hr>
  144. <div class="header">
  145. <p>
  146. Next: <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="n" rel="next">GDB/MI Output Records</a>, Previous: <a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" accesskey="p" rel="prev">GDB/MI Compatibility with CLI</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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>
  147. </div>
  148. </body>
  149. </html>