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-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: IPA Protocol Objects</title> 18 19<meta name="description" content="Debugging with GDB: IPA Protocol Objects"> 20<meta name="keywords" content="Debugging with GDB: IPA Protocol Objects"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="In_002dprocess-Agent-Protocol.html#In_002dprocess-Agent-Protocol" rel="up" title="In-process Agent Protocol"> 29<link href="IPA-Protocol-Commands.html#IPA-Protocol-Commands" rel="next" title="IPA Protocol Commands"> 30<link href="In_002dprocess-Agent-Protocol.html#In_002dprocess-Agent-Protocol" rel="previous" title="In-process Agent Protocol"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="IPA-Protocol-Objects"></a> 65<div class="header"> 66<p> 67Next: <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> [<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> 68</div> 69<hr> 70<a name="IPA-Protocol-Objects-1"></a> 71<h4 class="subsection">30.1.1 IPA Protocol Objects</h4> 72<a name="index-ipa-protocol-objects"></a> 73 74<p>The commands sent to and results received from agent may contain some 75complex data types called <em>objects</em>. 76</p> 77<p>The in-process agent is running on the same machine with <small>GDB</small> 78or GDBserver, so it doesn’t have to handle as much differences between 79two ends as remote protocol (see <a href="Remote-Protocol.html#Remote-Protocol">Remote Protocol</a>) tries to handle. 80However, there are still some differences of two ends in two processes: 81</p> 82<ol> 83<li> word size. On some 64-bit machines, <small>GDB</small> or GDBserver can be 84compiled as a 64-bit executable, while in-process agent is a 32-bit one. 85</li><li> ABI. Some machines may have multiple types of ABI, <small>GDB</small> or 86GDBserver is compiled with one, and in-process agent is compiled with 87the other one. 88</li></ol> 89 90<p>Here are the IPA Protocol Objects: 91</p> 92<ol> 93<li> agent expression object. It represents an agent expression 94(see <a href="Agent-Expressions.html#Agent-Expressions">Agent Expressions</a>). 95<a name="agent-expression-object"></a></li><li> tracepoint action object. It represents a tracepoint action 96(see <a href="Tracepoint-Actions.html#Tracepoint-Actions">Tracepoint Action Lists</a>) to collect registers, 97memory, static trace data and to evaluate expression. 98<a name="tracepoint-action-object"></a></li><li> tracepoint object. It represents a tracepoint (see <a href="Tracepoints.html#Tracepoints">Tracepoints</a>). 99<a name="tracepoint-object"></a> 100</li></ol> 101 102<p>The following table describes important attributes of each IPA protocol 103object: 104</p> 105<table> 106<thead><tr><th width="30%">Name</th><th width="20%">Size</th><th width="50%">Description</th></tr></thead> 107<tr><td width="30%"><em>agent expression object</em></td><td width="20%"></td><td width="50%"></td></tr> 108<tr><td width="30%">length</td><td width="20%">4</td><td width="50%">length of bytes code</td></tr> 109<tr><td width="30%">byte code</td><td width="20%"><var>length</var></td><td width="50%">contents of byte code</td></tr> 110<tr><td width="30%"><em>tracepoint action for collecting memory</em></td><td width="20%"></td><td width="50%"></td></tr> 111<tr><td width="30%">’M’</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr> 112<tr><td width="30%">addr</td><td width="20%">8</td><td width="50%">if <var>basereg</var> is ‘<samp>-1</samp>’, <var>addr</var> is the 113address of the lowest byte to collect, otherwise <var>addr</var> is the offset 114of <var>basereg</var> for memory collecting.</td></tr> 115<tr><td width="30%">len</td><td width="20%">8</td><td width="50%">length of memory for collecting</td></tr> 116<tr><td width="30%">basereg</td><td width="20%">4</td><td width="50%">the register number containing the starting 117memory address for collecting.</td></tr> 118<tr><td width="30%"><em>tracepoint action for collecting registers</em></td><td width="20%"></td><td width="50%"></td></tr> 119<tr><td width="30%">’R’</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr> 120<tr><td width="30%"><em>tracepoint action for collecting static trace data</em></td><td width="20%"></td><td width="50%"></td></tr> 121<tr><td width="30%">’L’</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr> 122<tr><td width="30%"><em>tracepoint action for expression evaluation</em></td><td width="20%"></td><td width="50%"></td></tr> 123<tr><td width="30%">’X’</td><td width="20%">1</td><td width="50%">type of tracepoint action</td></tr> 124<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> 125<tr><td width="30%"><em>tracepoint object</em></td><td width="20%"></td><td width="50%"></td></tr> 126<tr><td width="30%">number</td><td width="20%">4</td><td width="50%">number of tracepoint</td></tr> 127<tr><td width="30%">address</td><td width="20%">8</td><td width="50%">address of tracepoint inserted on</td></tr> 128<tr><td width="30%">type</td><td width="20%">4</td><td width="50%">type of tracepoint</td></tr> 129<tr><td width="30%">enabled</td><td width="20%">1</td><td width="50%">enable or disable of tracepoint</td></tr> 130<tr><td width="30%">step_count</td><td width="20%">8</td><td width="50%">step</td></tr> 131<tr><td width="30%">pass_count</td><td width="20%">8</td><td width="50%">pass</td></tr> 132<tr><td width="30%">numactions</td><td width="20%">4</td><td width="50%">number of tracepoint actions</td></tr> 133<tr><td width="30%">hit count</td><td width="20%">8</td><td width="50%">hit count</td></tr> 134<tr><td width="30%">trace frame usage</td><td width="20%">8</td><td width="50%">trace frame usage</td></tr> 135<tr><td width="30%">compiled_cond</td><td width="20%">8</td><td width="50%">compiled condition</td></tr> 136<tr><td width="30%">orig_size</td><td width="20%">8</td><td width="50%">orig size</td></tr> 137<tr><td width="30%">condition</td><td width="20%">4 if condition is NULL otherwise length of 138<a href="#agent-expression-object">agent expression object</a></td><td width="50%">zero if condition is NULL, otherwise is 139<a href="#agent-expression-object">agent expression object</a></td></tr> 140<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> 141</table> 142 143<hr> 144<div class="header"> 145<p> 146Next: <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> [<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 149 150 151</body> 152</html> 153