IPA-Protocol-Objects.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 5.1, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>Debugging with GDB: IPA Protocol Objects</title>
  16. <meta name="description" content="Debugging with GDB: IPA Protocol Objects">
  17. <meta name="keywords" content="Debugging with GDB: IPA Protocol Objects">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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="In_002dProcess-Agent-Protocol.html#In_002dProcess-Agent-Protocol" rel="up" title="In-Process Agent Protocol">
  26. <link href="IPA-Protocol-Commands.html#IPA-Protocol-Commands" rel="next" title="IPA Protocol Commands">
  27. <link href="In_002dProcess-Agent-Protocol.html#In_002dProcess-Agent-Protocol" rel="previous" title="In-Process Agent Protocol">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="IPA-Protocol-Objects"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="IPA-Protocol-Commands.html#IPA-Protocol-Commands" accesskey="n" rel="next">IPA Protocol Commands</a>, Up: <a href="In_002dProcess-Agent-Protocol.html#In_002dProcess-Agent-Protocol" accesskey="u" rel="up">In-Process Agent Protocol</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>
  62. </div>
  63. <hr>
  64. <a name="IPA-Protocol-Objects-1"></a>
  65. <h4 class="subsection">30.1.1 IPA Protocol Objects</h4>
  66. <a name="index-ipa-protocol-objects"></a>
  67. <p>The commands sent to and results received from agent may contain some
  68. complex data types called <em>objects</em>.
  69. </p>
  70. <p>The in-process agent is running on the same machine with <small>GDB</small>
  71. or GDBserver, so it doesn&rsquo;t have to handle as much differences between
  72. two ends as remote protocol (see <a href="Remote-Protocol.html#Remote-Protocol">Remote Protocol</a>) tries to handle.
  73. However, there are still some differences of two ends in two processes:
  74. </p>
  75. <ol>
  76. <li> word size. On some 64-bit machines, <small>GDB</small> or GDBserver can be
  77. compiled as a 64-bit executable, while in-process agent is a 32-bit one.
  78. </li><li> ABI. Some machines may have multiple types of ABI, <small>GDB</small> or
  79. GDBserver is compiled with one, and in-process agent is compiled with
  80. the other one.
  81. </li></ol>
  82. <p>Here are the IPA Protocol Objects:
  83. </p>
  84. <ol>
  85. <li> agent expression object. It represents an agent expression
  86. (see <a href="Agent-Expressions.html#Agent-Expressions">Agent Expressions</a>).
  87. <a name="agent-expression-object"></a></li><li> tracepoint action object. It represents a tracepoint action
  88. (see <a href="Tracepoint-Actions.html#Tracepoint-Actions">Tracepoint Action Lists</a>) to collect registers,
  89. memory, static trace data and to evaluate expression.
  90. <a name="tracepoint-action-object"></a></li><li> tracepoint object. It represents a tracepoint (see <a href="Tracepoints.html#Tracepoints">Tracepoints</a>).
  91. <a name="tracepoint-object"></a>
  92. </li></ol>
  93. <p>The following table describes important attributes of each IPA protocol
  94. object:
  95. </p>
  96. <table>
  97. <thead><tr><th width="30%">Name</th><th width="20%">Size</th><th width="50%">Description</th></tr></thead>
  98. <tr><td width="30%"><em>agent expression object</em></td><td width="20%"></td><td width="50%"></td></tr>
  99. <tr><td width="30%">length</td><td width="20%">4</td><td width="50%">length of bytes code</td></tr>
  100. <tr><td width="30%">byte code</td><td width="20%"><var>length</var></td><td width="50%">contents of byte code</td></tr>
  101. <tr><td width="30%"><em>tracepoint action for collecting memory</em></td><td width="20%"></td><td width="50%"></td></tr>
  102. <tr><td width="30%">&rsquo;M&rsquo;</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr>
  103. <tr><td width="30%">addr</td><td width="20%">8</td><td width="50%">if <var>basereg</var> is &lsquo;<samp>-1</samp>&rsquo;, <var>addr</var> is the
  104. address of the lowest byte to collect, otherwise <var>addr</var> is the offset
  105. of <var>basereg</var> for memory collecting.</td></tr>
  106. <tr><td width="30%">len</td><td width="20%">8</td><td width="50%">length of memory for collecting</td></tr>
  107. <tr><td width="30%">basereg</td><td width="20%">4</td><td width="50%">the register number containing the starting
  108. memory address for collecting.</td></tr>
  109. <tr><td width="30%"><em>tracepoint action for collecting registers</em></td><td width="20%"></td><td width="50%"></td></tr>
  110. <tr><td width="30%">&rsquo;R&rsquo;</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr>
  111. <tr><td width="30%"><em>tracepoint action for collecting static trace data</em></td><td width="20%"></td><td width="50%"></td></tr>
  112. <tr><td width="30%">&rsquo;L&rsquo;</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr>
  113. <tr><td width="30%"><em>tracepoint action for expression evaluation</em></td><td width="20%"></td><td width="50%"></td></tr>
  114. <tr><td width="30%">&rsquo;X&rsquo;</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr>
  115. <tr><td width="30%">agent expression</td><td width="20%">length of</td><td width="50%"><a href="#agent-expression-object">agent expression object</a></td></tr>
  116. <tr><td width="30%"><em>tracepoint object</em></td><td width="20%"></td><td width="50%"></td></tr>
  117. <tr><td width="30%">number</td><td width="20%">4</td><td width="50%">number of tracepoint</td></tr>
  118. <tr><td width="30%">address</td><td width="20%">8</td><td width="50%">address of tracepoint inserted on</td></tr>
  119. <tr><td width="30%">type</td><td width="20%">4</td><td width="50%">type of tracepoint</td></tr>
  120. <tr><td width="30%">enabled</td><td width="20%">1</td><td width="50%">enable or disable of tracepoint</td></tr>
  121. <tr><td width="30%">step_count</td><td width="20%">8</td><td width="50%">step</td></tr>
  122. <tr><td width="30%">pass_count</td><td width="20%">8</td><td width="50%">pass</td></tr>
  123. <tr><td width="30%">numactions</td><td width="20%">4</td><td width="50%">number of tracepoint actions</td></tr>
  124. <tr><td width="30%">hit count</td><td width="20%">8</td><td width="50%">hit count</td></tr>
  125. <tr><td width="30%">trace frame usage</td><td width="20%">8</td><td width="50%">trace frame usage</td></tr>
  126. <tr><td width="30%">compiled_cond</td><td width="20%">8</td><td width="50%">compiled condition</td></tr>
  127. <tr><td width="30%">orig_size</td><td width="20%">8</td><td width="50%">orig size</td></tr>
  128. <tr><td width="30%">condition</td><td width="20%">4 if condition is NULL otherwise length of
  129. <a href="#agent-expression-object">agent expression object</a></td><td width="50%">zero if condition is NULL, otherwise is
  130. <a href="#agent-expression-object">agent expression object</a></td></tr>
  131. <tr><td width="30%">actions</td><td width="20%">variable</td><td width="50%">numactions number of <a href="#tracepoint-action-object">tracepoint action object</a></td></tr>
  132. </table>
  133. <hr>
  134. <div class="header">
  135. <p>
  136. Next: <a href="IPA-Protocol-Commands.html#IPA-Protocol-Commands" accesskey="n" rel="next">IPA Protocol Commands</a>, Up: <a href="In_002dProcess-Agent-Protocol.html#In_002dProcess-Agent-Protocol" accesskey="u" rel="up">In-Process Agent Protocol</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>
  137. </div>
  138. </body>
  139. </html>