📄 bkenddoc.html
字号:
<pre> startAddr <= PC < endAddr</pre>Note the boundary condition: if (PC == <b>endAddr</b>) then stop stepping. Atthat point, a breakpoint event must be generated and the context beingstepped must be stopped. By convention, if <b>startAddr</b> and <b>endAddr</b> areboth zero then one machine instruction is stepped. The <b>context</b> fieldspecifies the context to step.<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>context.contextType</b> is equal to <b>WDB_CTX_SYSTEM</b>, then thesystem context is stepped.If <b>context.contextType</b> is <b>WDB_CTX_TASK</b>, then the <b>contextId</b> fieldspecifies the VxWorks task ID to step.<p>Stepping must be performed with interrupts locked.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success or one of the following error codes:<dl><dt><b>WDB_ERR_COMMUNICATION</b><dd>The connection to the target has died.<p><dt><b>WDB_ERR_AGENT_MODE</b><dd>The system mode agent can't step tasks.system context.<p><dt><b>WDB_ERR_INVALID_CONTEXT</b><dd>Invalid context.<p><dt><b>WDB_ERR_RT_ERROR</b><dd>Task step was attempted and failed.<p><dt><b>WDB_ERR_NO_RT_PROC</b><dd> Task step is not supported on target.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bkendDoc.html#top">bkendDoc</a></b>, * .I "API Programmer's Guide: Target Server Back End"<hr><a name="bkendContextSuspend"></a><p align=right><a href="rtnIndex.html"><i>Target Server Back End Interface : Routines</i></a></p></blockquote><h1><i>bkendContextSuspend</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>bkendContextSuspend</i>( )</strong> - suspend a context</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 bkendContextSuspend ( WDB_CTX * pWdbContext /* context to suspend */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function suspends the context described by a <b>WDB_CTX</b> structurepointed to by <i>pWdbContext</i>.<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 the <b>contextType</b> field is equal to <b>WDB_CTX_SYSTEM</b>, then the systemcontext is suspended.If <b>contextType</b> is <b>WDB_CTX_TASK</b>, then the <b>contextId</b> field specifiesthe VxWorks task ID to suspend.Task suspension is generally not supported by external mode agents.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success or one of the following error codes:<dl><dt><b>WDB_ERR_COMMUNICATION</b><dd>The connection to the target has died.<p><dt><b>WDB_ERR_AGENT_MODE</b><dd>The system mode agent can't suspend tasks.<p><dt><b>WDB_ERR_NO_RT_PROC</b><dd>Task suspension is not supported on target.<p><dt><b>WDB_ERR_INVALID_CONTEXT</b><dd>Invalid context.<p><dt><b>WDB_ERR_RT_ERROR</b><dd> Task suspension was attempted and failed.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bkendDoc.html#top">bkendDoc</a></b>, * .I "API Programmer's Guide: Target Server Back End"<hr><a name="bkendContextResume"></a><p align=right><a href="rtnIndex.html"><i>Target Server Back End Interface : Routines</i></a></p></blockquote><h1><i>bkendContextResume</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>bkendContextResume</i>( )</strong> - resume a context</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 bkendContextResume ( WDB_CTX * pWdbContext /* context to resume */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function resumes the context described by a <b>WDB_CTX</b> structurepointed to by <i>pWdbContext</i>.<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 the <b>contextType</b> field is equal to <b>WDB_CTX_SYSTEM</b>, then the systemcontext is resumed. If <b>contextType</b> is <b>WDB_CTX_TASK</b>, then the<b>contextId</b> field specifies the VxWorks task ID to resume. Taskresumption is generally not supported by external mode agents.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success or one of the following error codes:<dl><dt><b>WDB_ERR_COMMUNICATION</b><dd>The connection to the target has died.<p><dt><b>WDB_ERR_AGENT_MODE</b><dd>The system mode agent can't resume tasks.<p><dt><b>WDB_ERR_NO_RT_PROC</b><dd>Task resumption is not supported on target.<p><dt><b>WDB_ERR_INVALID_CONTEXT</b><dd>Invalid context.<p><dt><b>WDB_ERR_RT_ERROR</b><dd> Task resumption was attempted and failed.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bkendDoc.html#top">bkendDoc</a></b>, * .I "API Programmer's Guide: Target Server Back End"<hr><a name="bkendContextStatusGet"></a><p align=right><a href="rtnIndex.html"><i>Target Server Back End Interface : Routines</i></a></p></blockquote><h1><i>bkendContextStatusGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>bkendContextStatusGet</i>( )</strong> - get a context status</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 bkendContextStatusGet ( WDB_CTX * pWdbContext, /* context to get status of */ UINT32 * pCtxStatus /* context status */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function returns the status of a context on the target board. The context to test is specified by a <b>WDB_CTX</b> structure pointed to by the <i>pWdbContext</i>.<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 the <b>contextType</b> field is equal to <b>WDB_CTX_SYSTEM</b>, then the systemcontext status is returned. At present, this request is not supportedfor task mode contexts.<p>The context status is returned at the memory pointed to by <i>pCtxStatus</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success or one of the following error codes:<dl><dt><b>WDB_ERR_COMMUNICATION</b><dd>The connection to the target has died.<p><dt><b>WDB_ERR_AGENT_MODE</b><dd> The system mode agent can't get tasks status or task mode agent is running.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bkendDoc.html#top">bkendDoc</a></b>, * .I "API Programmer's Guide: Target Server Back End"<hr><a name="bkendDirectCall"></a><p align=right><a href="rtnIndex.html"><i>Target Server Back End Interface : Routines</i></a></p></blockquote><h1><i>bkendDirectCall</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>bkendDirectCall</i>( )</strong> - call a target function synchronously</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 bkendDirectCall ( WDB_CTX_CREATE_DESC * pWdbContext, /* function call parameters */ UINT32 * pStatus /* function return value */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine calls a target function immediately according to a<b>WDB_CTX_CREATE_DESC</b> structure pointed to by <i>pWdbContext</i>.<p><pre>typedef struct wdb_ctx_create_desc /* how to create a context */ { WDB_CTX_TYPE contextType; /* task or system context */ /* the following are used for task and system contexts */ TGT_ADDR_T stackBase; /* bottom of stack (NULL = malloc) */ UINT32 stackSize; /* stack size */ TGT_ADDR_T entry; /* context entry point */ TGT_INT_T args[10]; /* arguments */ /* the following are only used for task contexts */ WDB_STRING_T name; /* name */ TGT_INT_T priority; /* priority */ TGT_INT_T options; /* options */ TGT_INT_T redirIn; /* redirect input file (or 0) */ TGT_INT_T redirOut; /* redirect output file (or 0) */ TGT_INT_T redirErr; /* redirect error output file (or 0) */ } WDB_CTX_CREATE_DESC;</pre><p>Only the <b>entry</b> and <b>args</b> fields are used and the result isa 32-bit integer returned at the host address pointed to by <i>pStatus</i>.<p>If this request is serviced by a task-mode agent on the target, thefunction must be invoked in the agent's context.If this request is serviced by an external mode debugger, the functionmust still be called on the target (either by calling directlyin the case of a ROM monitor or by pushing a new call frame on thetarget execution stack in the case of an ICE back end).When the function is called by an external back end, it must guaranteethat the following conditions are true:<p><ul><li> the global variable <b>kernelState</b> is TRUE</li><li> the global variable <b>intCnt</b> is greater than zero</li><li> the existing value of errno is stored</li><li> the interrupts are masked via the processor's status register </ul><p><p>After the function completes, these resources must be returnedto their original state.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK on success or the following error code:<dl><dt><b>WDB_ERR_COMMUNICATION</b><dd> The connection to the target has died.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bkendDoc.html#top">bkendDoc</a></b>, * .I "API Programmer's Guide: Target Server Back End"<hr><a name="bkendEventpointAdd"></a><p align=right><a href="rtnIndex.html"><i>Target Server Back End Interface : Routines</i></a></p></blockquote><h1><i>bkendEventpointAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>bkendEventpointAdd</i>( )</strong> - add an event point</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT32 bkendEventpointAdd ( WDB_EVTPT_ADD_DESC * pWdbEventPoint, /* event point to add */ UINT32 * pEvtptNum /* event point number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function asks the back end to look for and handle some asynchronousevent on the target (for example, a breakpoint or a context exit).The event point is described by a <b>WDB_EVTPT_ADD_DESC</b> pointed toby <i>pWdbEventPoint</i>. The returned event-point ID is saved in thememory location pointed to by <i>pEvtptNum</i>.<p><pre>typedef struct wdb_evtpt_add_desc /* how to add an eventpt */ { WDB_EVT_TYPE evtType; /* type of event to detect */ TGT_INT_T numArgs; /* eventType dependent arguments */ UINT32 * args; /* arg list */ WDB_CTX context; /* context in which event must occur */ WDB_ACTION action; /* action to perform */ } WDB_EVTPT_ADD_DESC;</pre><p>The <b>evtType</b> field specifies the type of event (for example, <b>WDB_EVT_BP</b> for a breakpoint, <b>WDB_EVT_CTX_EXIT</b> for context exit,<b>WDB_EVT_CTX_START</b> for context start and <b>WDB_EVT_HW_BP</b> for hardwarebreakpoints). The <b>numArgs</b> and <b>args</b> fields are specific to each <b>evtType</b>. For example, <b>WDB_EVT_BP</b> has <b>numArgs</b> equal to oneor two, <b>args[0]</b> equal to the desired address and <b>args[1]</b> (optional) equal to the breakpoint count. <b>WDB_EVT_HW_BP</b> has <b>numArgs</b> equal to three, <b>args[0]</b> equal to the desired address, <b>args[1]</b> equal to the breakpoint count and <b>args[2]</b> equal to the breakpoint access type.Most other event types have <b>numArgs</b> equal to zero.Not all event types must be handled. However, to support sourcedebugging with CrossWind and a WDB agent, one must support at least the<b>WDB_EVT_BP</b> and <b>WDB_EVT_CTX_EXIT</b> event types.<p>The <b>context</b> field specifies the context to which the event point applies.This allows, for example, the setting of task-specific breakpoints.<p><pre>typedef enum wdb_ctx_type /* type of context on the target */ { WDB_CTX_SYSTEM = 0, /* system mode */ WDB_CTX_GROUP = 1, /* process group (not implemented) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -