Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

141 linhas
6.4KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1994-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 no
  7. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  8. Texts. A copy of the license is included in the section entitled "GNU
  9. Free Documentation License". -->
  10. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>Limitations (GDB&rsquo;s Obsolete Annotations)</title>
  14. <meta name="description" content="Limitations (GDB&rsquo;s Obsolete Annotations)">
  15. <meta name="keywords" content="Limitations (GDB&rsquo;s Obsolete Annotations)">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="makeinfo">
  19. <link href="index.html#Top" rel="start" title="Top">
  20. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  21. <link href="index.html#Top" rel="up" title="Top">
  22. <link href="Migrating-to-GDB_002fMI.html#Migrating-to-GDB_002fMI" rel="next" title="Migrating to GDB/MI">
  23. <link href="Annotations-Overview.html#Annotations-Overview" rel="prev" title="Annotations Overview">
  24. <style type="text/css">
  25. <!--
  26. a.summary-letter {text-decoration: none}
  27. blockquote.indentedblock {margin-right: 0em}
  28. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  29. blockquote.smallquotation {font-size: smaller}
  30. div.display {margin-left: 3.2em}
  31. div.example {margin-left: 3.2em}
  32. div.lisp {margin-left: 3.2em}
  33. div.smalldisplay {margin-left: 3.2em}
  34. div.smallexample {margin-left: 3.2em}
  35. div.smalllisp {margin-left: 3.2em}
  36. kbd {font-style: oblique}
  37. pre.display {font-family: inherit}
  38. pre.format {font-family: inherit}
  39. pre.menu-comment {font-family: serif}
  40. pre.menu-preformatted {font-family: serif}
  41. pre.smalldisplay {font-family: inherit; font-size: smaller}
  42. pre.smallexample {font-size: smaller}
  43. pre.smallformat {font-family: inherit; font-size: smaller}
  44. pre.smalllisp {font-size: smaller}
  45. span.nolinebreak {white-space: nowrap}
  46. span.roman {font-family: initial; font-weight: normal}
  47. span.sansserif {font-family: sans-serif; font-weight: normal}
  48. ul.no-bullet {list-style: none}
  49. -->
  50. </style>
  51. </head>
  52. <body lang="en">
  53. <a name="Limitations"></a>
  54. <div class="header">
  55. <p>
  56. Next: <a href="Migrating-to-GDB_002fMI.html#Migrating-to-GDB_002fMI" accesskey="n" rel="next">Migrating to GDB/MI</a>, Previous: <a href="Annotations-Overview.html#Annotations-Overview" accesskey="p" rel="prev">Annotations Overview</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>]</p>
  57. </div>
  58. <hr>
  59. <a name="Limitations-of-the-Annotation-Interface"></a>
  60. <h2 class="chapter">2 Limitations of the Annotation Interface</h2>
  61. <p>The level two annotations mechanism is known to have a number of
  62. technical and architectural limitations. As a consequence, in 2001,
  63. with the release of <small>GDB</small> 5.1 and the addition of <small>GDB/MI</small>,
  64. the annotation interface was marked as deprecated.
  65. </p>
  66. <p>This chapter discusses the known problems.
  67. </p>
  68. <a name="Dependant-on-CLI-output"></a>
  69. <h3 class="section">2.1 Dependant on <small>CLI</small> output</h3>
  70. <p>The annotation interface works by interspersing markups with
  71. <small>GDB</small> normal command-line interpreter output. Unfortunately, this
  72. makes the annotation client dependant on not just the annotations, but
  73. also the <small>CLI</small> output. This is because the client is forced to
  74. assume that specific <small>GDB</small> commands provide specific information.
  75. Any change to <small>GDB</small>&rsquo;s <small>CLI</small> output modifies or removes that
  76. information and, consequently, likely breaks the client.
  77. </p>
  78. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, it does not
  79. have this problem.
  80. </p>
  81. <a name="Scalability"></a>
  82. <h3 class="section">2.2 Scalability</h3>
  83. <p>The annotation interface relies on value annotations (see <a href="Value-Annotations.html#Value-Annotations">Value Annotations</a>) and the display mechanism as a way of obtaining up-to-date
  84. value information. These mechanisms are not scalable.
  85. </p>
  86. <p>In a graphical environment, where many values can be displayed
  87. simultaneously, a serious performance problem occurs when the client
  88. tries to first extract from <small>GDB</small>, and then re-display, all those
  89. values. The client should instead only request and update the values
  90. that changed.
  91. </p>
  92. <p>The <small>GDB/MI</small> Variable Objects provide just that mechanism.
  93. </p>
  94. <a name="Correctness"></a>
  95. <h3 class="section">2.3 Correctness</h3>
  96. <p>The annotation interface assumes that a variable&rsquo;s value can only be
  97. changed when the target is running. This assumption is not correct. A
  98. single assignment to a single variable can result in the entire target,
  99. and all displayed values, needing an update.
  100. </p>
  101. <p>The <small>GDB/MI</small> Variable Objects include a mechanism for efficiently
  102. reporting such changes.
  103. </p>
  104. <a name="Reliability"></a>
  105. <h3 class="section">2.4 Reliability</h3>
  106. <p>The <small>GDB/MI</small> interface includes a dedicated test directory
  107. (<samp>gdb/gdb.mi</samp>), and any addition or fix to <small>GDB/MI</small> must include
  108. testsuite changes.
  109. </p>
  110. <a name="Maintainability"></a>
  111. <h3 class="section">2.5 Maintainability</h3>
  112. <p>The annotation mechanism was implemented by interspersing <small>CLI</small> print
  113. statements with various annotations. As a consequence, any <small>CLI</small>
  114. output change can alter the annotation output.
  115. </p>
  116. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, and the
  117. <small>GDB/MI</small> is increasingly implemented independent of the <small>CLI</small>
  118. code, its long term maintenance is much easier.
  119. </p>
  120. <hr>
  121. <div class="header">
  122. <p>
  123. Next: <a href="Migrating-to-GDB_002fMI.html#Migrating-to-GDB_002fMI" accesskey="n" rel="next">Migrating to GDB/MI</a>, Previous: <a href="Annotations-Overview.html#Annotations-Overview" accesskey="p" rel="prev">Annotations Overview</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>]</p>
  124. </div>
  125. </body>
  126. </html>