Limitations.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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-2023 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.7, 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" rel="start" title="Top">
  20. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  21. <link href="index.html" rel="up" title="Top">
  22. <link href="Migrating-to-GDB_002fMI.html" rel="next" title="Migrating to GDB/MI">
  23. <link href="Annotations-Overview.html" 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. div.display {margin-left: 3.2em}
  29. div.example {margin-left: 3.2em}
  30. div.lisp {margin-left: 3.2em}
  31. kbd {font-style: oblique}
  32. pre.display {font-family: inherit}
  33. pre.format {font-family: inherit}
  34. pre.menu-comment {font-family: serif}
  35. pre.menu-preformatted {font-family: serif}
  36. span.nolinebreak {white-space: nowrap}
  37. span.roman {font-family: initial; font-weight: normal}
  38. span.sansserif {font-family: sans-serif; font-weight: normal}
  39. ul.no-bullet {list-style: none}
  40. -->
  41. </style>
  42. </head>
  43. <body lang="en">
  44. <span id="Limitations"></span><div class="header">
  45. <p>
  46. Next: <a href="Migrating-to-GDB_002fMI.html" accesskey="n" rel="next">Migrating to GDB/MI</a>, Previous: <a href="Annotations-Overview.html" accesskey="p" rel="prev">Annotations Overview</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  47. </div>
  48. <hr>
  49. <span id="Limitations-of-the-Annotation-Interface"></span><h2 class="chapter">2 Limitations of the Annotation Interface</h2>
  50. <p>The level two annotations mechanism is known to have a number of
  51. technical and architectural limitations. As a consequence, in 2001,
  52. with the release of <small>GDB</small> 5.1 and the addition of <small>GDB/MI</small>,
  53. the annotation interface was marked as deprecated.
  54. </p>
  55. <p>This chapter discusses the known problems.
  56. </p>
  57. <span id="Dependant-on-CLI-output"></span><h3 class="section">2.1 Dependant on <small>CLI</small> output</h3>
  58. <p>The annotation interface works by interspersing markups with
  59. <small>GDB</small> normal command-line interpreter output. Unfortunately, this
  60. makes the annotation client dependant on not just the annotations, but
  61. also the <small>CLI</small> output. This is because the client is forced to
  62. assume that specific <small>GDB</small> commands provide specific information.
  63. Any change to <small>GDB</small>&rsquo;s <small>CLI</small> output modifies or removes that
  64. information and, consequently, likely breaks the client.
  65. </p>
  66. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, it does not
  67. have this problem.
  68. </p>
  69. <span id="Scalability"></span><h3 class="section">2.2 Scalability</h3>
  70. <p>The annotation interface relies on value annotations (see <a href="Value-Annotations.html">Value Annotations</a>) and the display mechanism as a way of obtaining up-to-date
  71. value information. These mechanisms are not scalable.
  72. </p>
  73. <p>In a graphical environment, where many values can be displayed
  74. simultaneously, a serious performance problem occurs when the client
  75. tries to first extract from <small>GDB</small>, and then re-display, all those
  76. values. The client should instead only request and update the values
  77. that changed.
  78. </p>
  79. <p>The <small>GDB/MI</small> Variable Objects provide just that mechanism.
  80. </p>
  81. <span id="Correctness"></span><h3 class="section">2.3 Correctness</h3>
  82. <p>The annotation interface assumes that a variable&rsquo;s value can only be
  83. changed when the target is running. This assumption is not correct. A
  84. single assignment to a single variable can result in the entire target,
  85. and all displayed values, needing an update.
  86. </p>
  87. <p>The <small>GDB/MI</small> Variable Objects include a mechanism for efficiently
  88. reporting such changes.
  89. </p>
  90. <span id="Reliability"></span><h3 class="section">2.4 Reliability</h3>
  91. <p>The <small>GDB/MI</small> interface includes a dedicated test directory
  92. (<samp>gdb/gdb.mi</samp>), and any addition or fix to <small>GDB/MI</small> must include
  93. testsuite changes.
  94. </p>
  95. <span id="Maintainability"></span><h3 class="section">2.5 Maintainability</h3>
  96. <p>The annotation mechanism was implemented by interspersing <small>CLI</small> print
  97. statements with various annotations. As a consequence, any <small>CLI</small>
  98. output change can alter the annotation output.
  99. </p>
  100. <p>Since the <small>GDB/MI</small> output is independent of the <small>CLI</small>, and the
  101. <small>GDB/MI</small> is increasingly implemented independent of the <small>CLI</small>
  102. code, its long term maintenance is much easier.
  103. </p>
  104. <hr>
  105. <div class="header">
  106. <p>
  107. Next: <a href="Migrating-to-GDB_002fMI.html" accesskey="n" rel="next">Migrating to GDB/MI</a>, Previous: <a href="Annotations-Overview.html" accesskey="p" rel="prev">Annotations Overview</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  108. </div>
  109. </body>
  110. </html>