📄 wtx.html
字号:
<html><head><!-- /vobs/wpwr/docs/tornado-api/wtxpcl/wtx.html - generated by refgen from wtx.pcl --> <title> WTX </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado API Reference : WTX Protocol</i></a></p></blockquote><h1>WTX</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>WTX</strong> - WTX Protocol Requests </p></blockquote><h4>REQUESTS</h4><blockquote><p><p><b><a href="./wtx.html#INFORMATION">INFORMATION</a></b> - WTX-protocol-requests manual layout<br><b><a href="./wtx.html#WTX_AGENT_MODE_GET">WTX_AGENT_MODE_GET</a></b> - WTX get debug agent mode<br><b><a href="./wtx.html#WTX_AGENT_MODE_SET">WTX_AGENT_MODE_SET</a></b> - WTX set debug agent mode<br><b><a href="./wtx.html#WTX_CLOSE">WTX_CLOSE</a></b> - WTX close a file or pipe <br><b><a href="./wtx.html#WTX_CONSOLE_CREATE">WTX_CONSOLE_CREATE</a></b> - WTX create a virtual target console (UNIX only)<br><b><a href="./wtx.html#WTX_CONSOLE_KILL">WTX_CONSOLE_KILL</a></b> - WTX kill a virtual target console (UNIX only)<br><b><a href="./wtx.html#WTX_CONTEXT_CONT">WTX_CONTEXT_CONT</a></b> - WTX continue a context on the target<br><b><a href="./wtx.html#WTX_CACHE_TEXT_UPDATE">WTX_CACHE_TEXT_UPDATE</a></b> - WTX synchronize the instruction and data caches<br><b><a href="./wtx.html#WTX_COMMAND_SEND">WTX_COMMAND_SEND</a></b> - WTX pass a string to be interpreted by the target server<br><b><a href="./wtx.html#WTX_CONTEXT_CREATE">WTX_CONTEXT_CREATE</a></b> - WTX create a context on the target<br><b><a href="./wtx.html#WTX_CONTEXT_KILL">WTX_CONTEXT_KILL</a></b> - WTX destroy a context on the target<br><b><a href="./wtx.html#WTX_CONTEXT_RESUME">WTX_CONTEXT_RESUME</a></b> - WTX resume a context on the target<br><b><a href="./wtx.html#WTX_CONTEXT_STATUS_GET">WTX_CONTEXT_STATUS_GET</a></b> - WTX gets the context of a status on the target<br><b><a href="./wtx.html#WTX_CONTEXT_STEP">WTX_CONTEXT_STEP</a></b> - WTX step a context on the target<br><b><a href="./wtx.html#WTX_CONTEXT_SUSPEND">WTX_CONTEXT_SUSPEND</a></b> - WTX suspend a context on the target<br><b><a href="./wtx.html#WTX_DIRECT_CALL">WTX_DIRECT_CALL</a></b> - WTX call a function on the target within the agent<br><b><a href="./wtx.html#WTX_EVENTPOINT_ADD">WTX_EVENTPOINT_ADD</a></b> - WTX add an eventpoint <br><b><a href="./wtx.html#WTX_EVENTPOINT_ADD_2">WTX_EVENTPOINT_ADD_2</a></b> - WTX add an eventpoint <br><b><a href="./wtx.html#WTX_EVENTPOINT_DELETE">WTX_EVENTPOINT_DELETE</a></b> - WTX delete an eventpoint <br><b><a href="./wtx.html#WTX_EVENTPOINT_LIST">WTX_EVENTPOINT_LIST</a></b> - WTX return a list of eventpoints<br><b><a href="./wtx.html#WTX_EVENTPOINT_LIST_GET">WTX_EVENTPOINT_LIST_GET</a></b> - WTX return a list of eventpoints<br><b><a href="./wtx.html#WTX_EVENT_ADD">WTX_EVENT_ADD</a></b> - WTX add an event <br><b><a href="./wtx.html#WTX_EVENT_GET">WTX_EVENT_GET</a></b> - WTX get an event <br><b><a href="./wtx.html#WTX_EVENT_LIST_GET">WTX_EVENT_LIST_GET</a></b> - WTX get all the events in one call <br><b><a href="./wtx.html#WTX_FUNC_CALL">WTX_FUNC_CALL</a></b> - WTX call a function on the target <br><b><a href="./wtx.html#WTX_GOPHER_EVAL">WTX_GOPHER_EVAL</a></b> - WTX evaluate a Gopher program<br><b><a href="./wtx.html#WTX_INFO_GET">WTX_INFO_GET</a></b> - WTX get information about a given server<br><b><a href="./wtx.html#WTX_INFO_Q_GET">WTX_INFO_Q_GET</a></b> - WTX get information about a list of servers<br><b><a href="./wtx.html#WTX_MEM_ADD_TO_POOL">WTX_MEM_ADD_TO_POOL</a></b> - WTX add memory to the memory pool<br><b><a href="./wtx.html#WTX_MEM_ALIGN">WTX_MEM_ALIGN</a></b> - WTX allocate aligned target memory <br><b><a href="./wtx.html#WTX_MEM_ALLOC">WTX_MEM_ALLOC</a></b> - WTX allocate target memory <br><b><a href="./wtx.html#WTX_MEM_CHECKSUM">WTX_MEM_CHECKSUM</a></b> - WTX perform a target memory checksum <br><b><a href="./wtx.html#WTX_MEM_DISASSEMBLE">WTX_MEM_DISASSEMBLE</a></b> - WTX target memory disassembler<br><b><a href="./wtx.html#WTX_MEM_FREE">WTX_MEM_FREE</a></b> - WTX free a block of target memory <br><b><a href="./wtx.html#WTX_MEM_INFO_GET">WTX_MEM_INFO_GET</a></b> - WTX get information about the target memory pool<br><b><a href="./wtx.html#WTX_MEM_MOVE">WTX_MEM_MOVE</a></b> - WTX move target memory <br><b><a href="./wtx.html#WTX_MEM_WIDTH_READ">WTX_MEM_WIDTH_READ</a></b> - WTX target memory read <br><b><a href="./wtx.html#WTX_MEM_WIDTH_WRITE">WTX_MEM_WIDTH_WRITE</a></b> - WTX target memory write <br><b><a href="./wtx.html#WTX_MEM_READ">WTX_MEM_READ</a></b> - WTX target memory read <br><b><a href="./wtx.html#WTX_MEM_REALLOC">WTX_MEM_REALLOC</a></b> - WTX reallocate target memory <br><b><a href="./wtx.html#WTX_MEM_SCAN">WTX_MEM_SCAN</a></b> - WTX search for a pattern in target memory<br><b><a href="./wtx.html#WTX_MEM_SET">WTX_MEM_SET</a></b> - WTX target memory set<br><b><a href="./wtx.html#WTX_MEM_WRITE">WTX_MEM_WRITE</a></b> - WTX target memory write <br><b><a href="./wtx.html#WTX_OBJ_KILL">WTX_OBJ_KILL</a></b> - WTX object kill <br><b><a href="./wtx.html#WTX_OBJ_MODULE_CHECKSUM">WTX_OBJ_MODULE_CHECKSUM</a></b> - WTX checks validity of the target memory<br><b><a href="./wtx.html#WTX_OBJ_MODULE_FIND">WTX_OBJ_MODULE_FIND</a></b> - WTX find an object module<br><b><a href="./wtx.html#WTX_OBJ_MODULE_INFO_GET">WTX_OBJ_MODULE_INFO_GET</a></b> - WTX get information about an object module <br><b><a href="./wtx.html#WTX_OBJ_MODULE_LIST">WTX_OBJ_MODULE_LIST</a></b> - WTX list loaded object modules <br><b><a href="./wtx.html#WTX_OBJ_MODULE_LOAD">WTX_OBJ_MODULE_LOAD</a></b> - WTX load an object module into target memory <br><b><a href="./wtx.html#WTX_OBJ_MODULE_LOAD_2">WTX_OBJ_MODULE_LOAD_2</a></b> - WTX load an object module into target memory <br><b><a href="./wtx.html#WTX_OBJ_MODULE_UNLOAD">WTX_OBJ_MODULE_UNLOAD</a></b> - WTX unload an object module <br><b><a href="./wtx.html#WTX_OBJ_MODULE_UNLOAD_2">WTX_OBJ_MODULE_UNLOAD_2</a></b> - WTX unload an object module<br><b><a href="./wtx.html#WTX_OPEN">WTX_OPEN</a></b> - WTX open a file or pipe <br><b><a href="./wtx.html#WTX_REGISTER">WTX_REGISTER</a></b> - WTX register a server<br><b><a href="./wtx.html#WTX_REGISTER_FOR_EVENT">WTX_REGISTER_FOR_EVENT</a></b> - WTX register for events <br><b><a href="./wtx.html#WTX_REGS_GET">WTX_REGS_GET</a></b> - WTX get target registers <br><b><a href="./wtx.html#WTX_REGS_SET">WTX_REGS_SET</a></b> - WTX set target registers <br><b><a href="./wtx.html#WTX_SYM_ADD">WTX_SYM_ADD</a></b> - WTX add a symbol <br><b><a href="./wtx.html#WTX_SYM_FIND">WTX_SYM_FIND</a></b> - WTX find a symbol <br><b><a href="./wtx.html#WTX_SYM_LIST_GET">WTX_SYM_LIST_GET</a></b> - WTX get a list of symbols <br><b><a href="./wtx.html#WTX_SYM_REMOVE">WTX_SYM_REMOVE</a></b> - WTX remove a symbol <br><b><a href="./wtx.html#WTX_SYM_TBL_INFO_GET">WTX_SYM_TBL_INFO_GET</a></b> - WTX get information about a symbol table <br><b><a href="./wtx.html#WTX_TARGET_ATTACH">WTX_TARGET_ATTACH</a></b> - WTX attach a target to the target server<br><b><a href="./wtx.html#WTX_TARGET_RESET">WTX_TARGET_RESET</a></b> - WTX reset a target <br><b><a href="./wtx.html#WTX_TOOL_ATTACH">WTX_TOOL_ATTACH</a></b> - WTX attach a tool to a target server<br><b><a href="./wtx.html#WTX_TOOL_DETACH">WTX_TOOL_DETACH</a></b> - WTX detach a tool from a target server<br><b><a href="./wtx.html#WTX_TS_INFO_GET">WTX_TS_INFO_GET</a></b> - WTX get target and target server information <br><b><a href="./wtx.html#WTX_TS_LOCK">WTX_TS_LOCK</a></b> - WTX target server lock<br><b><a href="./wtx.html#WTX_TS_UNLOCK">WTX_TS_UNLOCK</a></b> - WTX target server unlock <br><b><a href="./wtx.html#WTX_UNREGISTER">WTX_UNREGISTER</a></b> - WTX unregister a server<br><b><a href="./wtx.html#WTX_UNREGISTER_FOR_EVENT">WTX_UNREGISTER_FOR_EVENT</a></b> - WTX unregister for events <br><b><a href="./wtx.html#WTX_VIO_CHAN_GET">WTX_VIO_CHAN_GET</a></b> - WTX get a virtual I/O channel number<br><b><a href="./wtx.html#WTX_VIO_CHAN_RELEASE">WTX_VIO_CHAN_RELEASE</a></b> - WTX release a virtual-I/O-channel number<br><b><a href="./wtx.html#WTX_VIO_CTL">WTX_VIO_CTL</a></b> - WTX virtual I/O control <br><b><a href="./wtx.html#WTX_VIO_FILE_LIST">WTX_VIO_FILE_LIST</a></b> - WTX list files managed by the target server<br><b><a href="./wtx.html#WTX_VIO_WRITE">WTX_VIO_WRITE</a></b> - WTX write to a virtual I/O channel <br><p></blockquote><h4>DESCRIPTION </h4><blockquote><p><p><p>This document contains the Wind River Tool eXchange version 2.0 protocolreference. The WTX protocol is the backbone of the Tornado toolsenvironment. It consists of a set of requests that are issued by tools connected to a target server (such as a shell or a debugger) to debug and monitor a real-time target system.<p>This document is intended to serve as a reference for implementers ofTornado tools. It should be used along with the WTX C API and WTX Tcl APIreference entries.<p></blockquote><h4>TORNADO OVERVIEW</h4><blockquote><p>The diagram below gives an overview of the Tornado environment.<p><pre> +---------+ +---------+ +---------+ +---------+ | | | | | | | | | Shell | | Debugger| | Browser | | Other | | | | | | | | Tools | +----+----+ +----+----+ +----+----+ +----+----+ | | | | +--------------------+ | +-----------+ | | | | +-----------------------+ WTX | | | | Protocol | | | | +--+--+--+--+---+ | | | Target Server | | | +--+---+--+--+--+ | | | +-------------------+ +-------+ | +---------+ | | | | | Target +---+---+ +---+----+ +---+----+ +---+----+ Communication | WDB | | WDB | | WDB | |Non-WDB | Back Ends | RPC | | NetROM | | Serial | |Back End| +---+---+ +---+----+ +----+---+ +---+----+ | | | | Host | | | | - - - - - - - - - - - - -|- - - - - -|- - - - - - -|- - - - - -|- - - Target (or simulator) | | | | | | | | +---+---+ +---+----+ +----+---+ | |Network| | NetROM | | Serial | | WDB Target Agent |Comm if| |Comm if | |Comm if | | Communication +---+---+ +---+----+ +----+---+ | Interfaces | | | | +-------+ | +---------+ | | | | | +-+---+---+-+ +----+----+ |WDB Target | | Non-WDB | Agents | Agent | | Agent | +-----+-----+ +----+----+ | | +----+----+ | | | | | vxWorks +--------------------+ | | +---------+</pre>The Wind River Tools eXchange protocol (WTX) permits a number of toolsrunning on a host system to communicate with one or more host-based targetserver(s) to operate on targets running VxWorks. Target servers can also be connected to targetsimulators like VxSIM. A target server is connected to only one target buta tool can be connected to more than one target server at a time.<p>Warning, version 2 of the protocol will replace older version of therequests in the next release.<p></blockquote><h4>PROTOCOL OVERVIEW</h4><blockquote><p>WTX requests can be categorized by the type of service they provide:<p><dl><dt>Session management<dd>Start and stop a target server, attach and detach from a server, lock and unlock access to a server.<p><dt>Information<dd>Return information about the target server, the target configuration, and the target runtime system.<p><dt>Event management<dd>Notify tools of events such as exceptions that occur on the target,allow tools to send messages to other tools via the target server.<p><dt>Context management<dd>Create, suspend, and kill target contexts (tasks).<p><dt>Context debug<dd>Add and remove breakpoints and single step a task or the systemcontext.<p><dt>Register operations<dd>Set and get target CPU register values.<p><dt>Runtime object information<dd>Return information about target system objects like tasks and semaphores usingthe Gopher language.<p><dt>Object module management<dd>Load, unload, and get information about object modules loaded on the target system.<p><dt>Symbol management<dd>Manipulate the target-server-resident target symbols by adding,removing, searching, and listing them.<p><dt>Target memory operations<dd>Allocate, free, read, and write target memory as well as search forpatterns and perform checksumming; the allocate and free requests operate on asubset of the target memory managed by the target server and called the"target-server-managed target memory pool."<p><dt>Service management<dd>Add and list WTX and agent services.<p><dt>Virtual I/O operations<dd>Target contexts read and write data to and from host files,processes, or tools.<p><dt>Registry operations<dd>Tools obtain information needed to access a given targetserver. </dl><p><p></blockquote><h4>PROTOCOL USAGE</h4><blockquote><p>The WTX protocol is used in two ways: to connect the target server to theregistry and to connect tools to the target server.<p></blockquote><h4>WTX REGISTRY SESSION</h4><blockquote><p>Tools using WTX rely on the WTX registry daemon <b><a href="../../tornado/tools/wtxregd.html#top" >wtxregd</a></b> to be running ona host somewhere on the network and to provide the "key" needed to reach aparticular target server. For RPC-based WTX servers, this key is a stringincluding the host name where the target server runs and the RPC programnumber for the target server.<p>The key to the WTX registry itself is a well known value. For RPC-basedWTX, this key is made of the well known value, <b>WTX_RPC_PROG</b>, defined in<b>wtxrpc.h</b> and a host name given by the environment variable <b>WIND_REGISTRY</b>.<p>When a target server starts, it first registers itself into the WTX registryusing the <b><a href="./wtx.html#WTX_REGISTER">WTX_REGISTER</a></b> request. Tools wishing to communicate withthat target server ask the WTX registry for the target server key usingthe <b><a href="./wtx.html#WTX_INFO_GET">WTX_INFO_GET</a></b> request.<p><pre> Target Server Registry Tool ------------- -------- ------------------ . register using "name" . (WTX_REGISTER)------------> | generate key and record it | <--------------------- | . Get Target Server key . <----------------(WTX_INFO_GET) . | . return key . | . -----------------------> . . | . . Attach to Target Server . . (WTX_TOOL_ATTACH) . . | . . . . . . . . Detach from Target Server . . (WTX_TOOL_DETACH) . . | . . exit unregister . (WTX_UNREGISTER)------------> | remove Target Server entry | <--------------------- | . exit . .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -