Limitations.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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-2019 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 5.2, http://www.gnu.org/software/texinfo/ -->
  11. <head>
  12. <title>GDB&rsquo;s Obsolete Annotations: Limitations</title>
  13. <meta name="description" content="GDB&rsquo;s Obsolete Annotations: Limitations">
  14. <meta name="keywords" content="GDB&rsquo;s Obsolete Annotations: Limitations">
  15. <meta name="resource-type" content="document">
  16. <meta name="distribution" content="global">
  17. <meta name="Generator" content="makeinfo">
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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.smallquotation {font-size: smaller}
  28. div.display {margin-left: 3.2em}
  29. div.example {margin-left: 3.2em}
  30. div.indentedblock {margin-left: 3.2em}
  31. div.lisp {margin-left: 3.2em}
  32. div.smalldisplay {margin-left: 3.2em}
  33. div.smallexample {margin-left: 3.2em}
  34. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  46. span.nolinebreak {white-space:nowrap}
  47. span.roman {font-family:serif; font-weight:normal}
  48. span.sansserif {font-family:sans-serif; font-weight:normal}
  49. ul.no-bullet {list-style: none}
  50. -->
  51. </style>
  52. </head>
  53. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  54. <a name="Limitations"></a>
  55. <div class="header">
  56. <p>
  57. 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>
  58. </div>
  59. <hr>
  60. <a name="Limitations-of-the-Annotation-Interface"></a>
  61. <h2 class="chapter">2 Limitations of the Annotation Interface</h2>
  62. <p>The level two annotations mechanism is known to have a number of
  63. technical and architectural limitations. As a consequence, in 2001,
  64. with the release of <small>GDB</small> 5.1 and the addition of <small>GDB/MI</small>,
  65. the annotation interface was marked as deprecated.
  66. </p>
  67. <p>This chapter discusses the known problems.
  68. </p>
  69. <a name="Dependant-on-CLI-output"></a>
  70. <h3 class="section">2.1 Dependant on <small>CLI</small> output</h3>
  71. <p>The annotation interface works by interspersing markups with
  72. <small>GDB</small> normal command-line interpreter output. Unfortunately, this
  73. makes the annotation client dependant on not just the annotations, but
  74. also the <small>CLI</small> output. This is because the client is forced to
  75. assume that specific <small>GDB</small> commands provide specific information.
  76. Any change to <small>GDB</small>&rsquo;s <small>CLI</small> output modifies or removes that
  77. information and, consequently, likely breaks the client.
  78. </p>
  79. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, it does not
  80. have this problem.
  81. </p>
  82. <a name="Scalability"></a>
  83. <h3 class="section">2.2 Scalability</h3>
  84. <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
  85. value information. These mechanisms are not scalable.
  86. </p>
  87. <p>In a graphical environment, where many values can be displayed
  88. simultaneously, a serious performance problem occurs when the client
  89. tries to first extract from <small>GDB</small>, and then re-display, all those
  90. values. The client should instead only request and update the values
  91. that changed.
  92. </p>
  93. <p>The <small>GDB/MI</small> Variable Objects provide just that mechanism.
  94. </p>
  95. <a name="Correctness"></a>
  96. <h3 class="section">2.3 Correctness</h3>
  97. <p>The annotation interface assumes that a variable&rsquo;s value can only be
  98. changed when the target is running. This assumption is not correct. A
  99. single assignment to a single variable can result in the entire target,
  100. and all displayed values, needing an update.
  101. </p>
  102. <p>The <small>GDB/MI</small> Variable Objects include a mechanism for efficiently
  103. reporting such changes.
  104. </p>
  105. <a name="Reliability"></a>
  106. <h3 class="section">2.4 Reliability</h3>
  107. <p>The <small>GDB/MI</small> interface includes a dedicated test directory
  108. (<samp>gdb/gdb.mi</samp>), and any addition or fix to <small>GDB/MI</small> must include
  109. testsuite changes.
  110. </p>
  111. <a name="Maintainability"></a>
  112. <h3 class="section">2.5 Maintainability</h3>
  113. <p>The annotation mechanism was implemented by interspersing <small>CLI</small> print
  114. statements with various annotations. As a consequence, any <small>CLI</small>
  115. output change can alter the annotation output.
  116. </p>
  117. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, and the
  118. <small>GDB/MI</small> is increasingly implemented independent of the <small>CLI</small>
  119. code, its long term maintenance is much easier.
  120. </p>
  121. <hr>
  122. <div class="header">
  123. <p>
  124. 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>
  125. </div>
  126. </body>
  127. </html>