📄 wdb.html
字号:
<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_MEM_READ"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_MEM_READ</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_MEM_READ</strong> - read memory from the target</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: WDB_MEM_REGIONOUTPUT: WDB_MEM_XFER</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This request reads the contents of a specified target memory regionto a host buffer. The region to read is specified by <b>WDB_MEM_REGION</b>:<p><pre>typedef struct wdb_mem_region /* a region of target memory */ { TGT_ADDR_T baseAddr; /* memory region base address */ TGT_INT_T numBytes; /* memory region size */ UINT32 param; /* proc dependent parameter */ } WDB_MEM_REGION;</pre><p>where <b>baseAddr</b> is the starting address and <b>numBytes</b> is the numberof bytes to read.<p>The memory is returned in <b>WDB_MEM_XFER</b>:<p><pre>typedef struct wdb_mem_xfer /* transfer a block of memory */ { WDB_OPQ_DATA_T source; /* data to transfer */ TGT_ADDR_T destination; /* requested destination */ TGT_INT_T numBytes; /* number of bytes transferred */ } WDB_MEM_XFER;</pre><p>This structure should be initialized to point to a host buffer (or zero to malloc).<p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt><b>WDB_ERR_MEM_ACCES</b><dd>The target memory cannot be read.<p><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_MEM_SCAN"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_MEM_SCAN</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_MEM_SCAN</strong> - scan a block of target memory for a pattern</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: WDB_MEM_SCAN_DESCOUTPUT: TGT_ADDR_T</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine scans a block of target memory for a pattern. The input parameters are specified in <b>WDB_MEM_SCAN_DESC</b>:<p><pre>typedef struct wdb_mem_scan_desc { WDB_MEM_REGION memRegion; /* region of memory to scan */ WDB_MEM_XFER memXfer; /* pattern to scan for */ } WDB_MEM_SCAN_DESC;</pre><p>where <b>WDB_MEM_REGION</b> is:<p><pre>typedef struct wdb_mem_region /* a region of target memory */ { TGT_ADDR_T baseAddr; /* memory region base address */ TGT_INT_T numBytes; /* memory region size */ UINT32 param; /* proc dependent parameter */ } WDB_MEM_REGION;</pre><p>and <b>WDB_MEM_XFER</b> is:<p><pre>typedef struct wdb_mem_xfer /* transfer a block of memory */ { WDB_OPQ_DATA_T source; /* data to transfer */ TGT_ADDR_T destination; /* requested destination */ TGT_INT_T numBytes; /* number of bytes transferred */ } WDB_MEM_XFER;</pre><p><b>memRegion</b> specifies the region of target memoryto search and <b>memXfer</b> specifies the pattern to search for.If <b>numBytes</b> is greater than 0, search forwards. Otherwisea backwards search is performed.If <b>param</b> is equal to 0, the search tries to match the pattern specifiedby <b>source</b>. Otherwise the search continues until the pattern does notmatch. <p>The return value is the address at which the match was found. <b>TGT_ADDR_T</b>is a type defined in <b>host.h</b>.<p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt><b>WDB_ERR_MEM_ACCES</b><dd>The target memory cannot be read.<p><dt><b>WDB_ERR_NOT_FOUND</b><dd>The pattern cannot be found.<p><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_MEM_WRITE"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_MEM_WRITE</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_MEM_WRITE</strong> - write the contents of host memory to target memory</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: WDB_MEM_XFEROUTPUT: (</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This request writes from host memory to target memory. The sourceis specified by <b>WDB_MEM_XFER</b>:<p><pre>typedef struct wdb_mem_xfer /* transfer a block of memory */ { WDB_OPQ_DATA_T source; /* data to transfer */ TGT_ADDR_T destination; /* requested destination */ TGT_INT_T numBytes; /* number of bytes transferred */ } WDB_MEM_XFER;</pre><p><b>source</b> is set to the address of a memory blockon the host. <b>numBytes</b> indicates the number ofbytes to transfer. <b>destination</b> points to atarget address to which the memory contents should be transferred.<p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt><b>WDB_ERR_MEM_ACCES</b><dd>The target memory cannot be written.<p><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_MODE_GET"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_MODE_GET</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_MODE_GET</strong> - get the agent mode</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: )OUTPUT: INPUT:</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This request gets the agent mode. The return value can be either:<p><dl><dt><b>WDB_MODE_TASK</b><dd>the agent runs as a task.<p><dt><b>WDB_MODE_EXTERN</b><dd> the agent runs in external mode. </dl><p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_MODE_SET"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_MODE_SET</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_MODE_SET</strong> - set the agent mode</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: UINT32OUTPUT: (</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This request sets the agent mode. The input parameter can be either:<p><dl><dt><b>WDB_MODE_TASK</b><dd>the agent runs as a task.<p><dt><b>WDB_MODE_EXTERN</b><dd> the agent runs in external mode. </dl><p>The agent can only perform external mode debuggingif it is communicating using a driver that supports polled mode.<p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt><b>WDB_ERR_AGENT_MODE</b><dd>The requested mode is not supported by the agent.<p><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wdb.html#top">WDB</a></b><hr><a name="WDB_REGS_GET"></a><p align=right><a href="rtnIndex.html"><i>WDB Protocol : Requests</i></a></p></blockquote><h1>WDB_REGS_GET</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WDB_REGS_GET</strong> - get the registers of a context on the target</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>INPUT: WDB_REG_READ_DESCOUTPUT: WDB_MEM_XFER</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the registers of the context specified by <b>WDB_REG_READ_DESC</b>:<p><pre>typedef struct wdb_reg_read_desc /* register data to read */ { WDB_REG_SET_TYPE regSetType; /* type of register set to read */ WDB_CTX context; /* context associated with registers */ WDB_MEM_REGION memRegion; /* subregion of the register block */ } WDB_REG_READ_DESC;</pre><p>where <b>WDB_CTX</b> is:<p><pre>typedef struct wdb_ctx /* a particular context */ { WDB_CTX_TYPE contextType; /* type of context */ UINT32 contextId; /* context ID */ } WDB_CTX;</pre><p>If <b>contextType</b> is <b>WDB_CTX_SYSTEM</b> the routine getsthe VxWorks registers at the time the system-mode agent last stoppedthe system. (This only makes sense if you are doing external-modedebugging.) Otherwise the routine getsthe registers of task <b>contextId</b>. <b>regSetType</b> determines the type of registers to get as specified by:<p><pre>typedef enum wdb_reg_set_type /* a type of register set */ { WDB_REG_SET_IU = 0, /* integer unit register set */ WDB_REG_SET_FPU = 1, /* floating point unit register set */ WDB_REG_SET_MMU = 2, /* memory management unit reg set */ WDB_REG_SET_CU = 3, /* cache unit register set */ WDB_REG_SET_TPU = 4, /* timer processor unit register set */ WDB_REG_SET_SYS = 5 /* system registers */ } WDB_REG_SET_TYPE;</pre><p>Currently supported register sets include:<dl><dt><b>WDB_REG_SET_IU</b><dd>integer unit register<p><dt><b>WDB_REG_SET_FPU</b><dd> floating point unit register set </dl><p>The return structure <b>WDB_MEM_XFER</b> is:<p><pre>typedef struct wdb_mem_xfer /* transfer a block of memory */ { WDB_OPQ_DATA_T source; /* data to transfer */ TGT_ADDR_T destination; /* requested destination */ TGT_INT_T numBytes; /* number of bytes transferred */ } WDB_MEM_XFER;</pre><p><b>source</b> must point to a buffer on the host into which the contents of theregister set can be copied. The register set is treated by the agent asan opaque block of memory; the bits are transferred with no swapping orother changes. The actual structure of the block is determined by theVxWorks data structures <b>REG_SET</b> and <b>FPREG_SET</b>. <b>memRegion</b> specifies theregion within the block of memory to upload.<p></blockquote><h4>ERRORS</h4><blockquote><p><p><dl><dt><b>WDB_ERR_INVALID_PARAMS</b><dd>The register-set type is unsupported.<p><dt><b>WDB_ERR_NO_RT_PROC</b><dd>The agent does not support this service.<p><dt>WDB and RPC errors<dd> As described in the "REPLY ERRORS" section of the WDBman page.<p></dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -