wtx.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:41k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* wtx.h - wtx protocol header file */
  2. /* Copyright 1984-2001 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 03v,10dec01,sn   include demanglerTypes.h instead of demangler.h (so that safe
  7.                  for gdb to include)
  8. 03u,04dec01,sn   added wtxDefaultDemanglerStyle
  9. 03t,05dec01,fle  added Object directory retirving to wtxCpuInfoGet ()
  10. 03s,04oct01,c_c  Added wtxToolNameGet API.
  11. 03r,11sep01,fle  added declaration of wtxEnvironRegistryOptionsGet () routine
  12. 03q,06feb01,dtr  Adding check for altivec support.
  13. 03p,25may99,fle  added WTX_SVR_TYPE enum  SPR 67367
  14. 03o,23feb99,c_c  Implemented an API to get the target IP address (SPR #25044).
  15. 03n,22sep98,l_k  Removed wtxFindExecutable.
  16. 03m,21sep98,l_k  Implement wtxFindExecutable.
  17. 03l,18sep98,pcn  Implement wtxObjModuleInfoAndPathGet.
  18. 03k,18aug98,pcn  Use WTX_MSG_EVTPT_LIST_2.
  19. 03j,20jul98,pcn  Added evtptNum and toolId in the wtxEventpointListGet return
  20.  list.
  21. 03i,06jul98,pcn  Removed wtxObjModuleUndefSymAdd from API.
  22. 03h,19jun98,pcn  Added wtxObjModuleLoadStart, wtxObjModuleLoadProgressReport,
  23.  wtxObjModuleLoadCancel.
  24. 03g,11jun98,pcn  Added an input parameter at wtxEventListGet.
  25. 03f,09jun98,jmp  added wtxAsyncResultFree and wtxAsyncEventGet().
  26. 03e,03jun98,pcn  Added 2 requests: wtxSymListByModuleNameGet and
  27.  wtxSymListByModuleIdGet.
  28. 03d,25may98,pcn  Changed wtxTsLock in wtxTsTimedLock, wtxEventpointList_2 in
  29.  wtxEventpointListGet, wtxObjModuleUnload_2 in
  30.  wtxObjModuleUnloadByName.
  31. 03c,30apr98,dbt  added wtxHwBreakpointAdd and wtxEventpointAdd.
  32. 03b,28apr98,pcn  Removed wtxCommandSend.
  33. 03a,23apr98,fle  added CPU name retrieving to wtxCpuInfoGet
  34. 02z,21apr98,fle  added wtxCpuInfoGet()
  35. 02y,26mar98,pcn  WTX 2: added a new parameter in wtxLogging.
  36. 02x,03mar98,fle  got rid of wtxRegistryPing() function declaration
  37. 02w,02mar98,pcn  WTX 2: moved WTX_LD_M_FILE_DESC in wtxMsg.h. Added
  38.  WTX_EVTPT_LIST_2 definition. Added wtxAsyncNotifyEnable,
  39.  wtxAsyncNotifyDisable, wtxCacheTextUpdate, wtxCommandSend,
  40.  wtxEventListGet, wtxEventpointList_2, wtxLogging,
  41.  wtxMemWidthRead, wtxMemWidthWrite, wtxObjModuleChecksum,
  42.  wtxObjModuleLoad_2, wtxObjModuleUnloa wtxUnregisterForEvent.
  43.  Changed wtxTargetRtTypeGet, wtxTargetCpuTypeGet return type.
  44. 02v,29jan98,fle  added wtxRegistryPing() declaration
  45.  + added WTX_REGISTRY_PING_INTERVAL definition
  46. 02u,28jan98,c_c  Packed all wtxEvtxxxStringGet routines into one.
  47. 02t,29aug97,fle  Adding the WTX_MEM_DISASSEMBLE service
  48.  + got rid of old C style declaration (only STDC remains)
  49. 02s,30sep96,elp  put in share/, added wtxObjModuleUndefSymAdd(),
  50.  wtxSymAddWithGroup() (SPR# 6775).
  51. 02r,27sep96,sjw  correct prototype for wtxTsVersionGet, was wtsTsVersionGet
  52. 02q,18sep96,dgp  doc: change spelling of alignement to alignment for API Guide
  53.  in wtxMemAlign
  54. 02p,05sep96,elp  changed val in wtxMemSet() from UINT8 to UINT32 (SPR# 6984).
  55. 02o,02sep96,jmp  added wtxToolIdGet() prototypes,
  56.  added WTX RPC service number argument to wtxServiceAdd().
  57. 02n,30aug96,elp  changed wpwrVersionGet() into wtxTsVersionGet().
  58. 02m,17jun96,p_m  changed type of flags parameter in wtxFileOpen() (SPR# 4941).
  59. 02l,30may96,elp  added wtxToolNameGet(), wpwrVersionGet(), wtxServiceAdd() and
  60.  wtxSymTblInfoGet() prototypes (SPR# 6502).
  61. 02k,09nov95,p_m  removed un-necessary version defines.
  62. 02h,03nov95,jmp  added wtxErrSet() prototype.
  63. 02g,25oct95,p_m  added wtxAgentModeGet() (SPR# 5231) and wtxDirectCall().
  64. 02f,26sep95,s_w  rename wtxBreakpointDelete() to wtxEventpointDelete() 
  65.  (SPR 4852)
  66. 02e,05sep95,s_w  add WTX_LD_M_FILE_DESC type and change wtxObjModuleLoad()
  67.  prototype (for SPR 4598)
  68. 02d,08jun95,c_s  added wtxTargetAttach().
  69. 02c,02jun95,p_m  added WTX_PROTOCOL_VERSION.
  70. 02b,01jun95,p_m  replaced isText by contextType and added returnType in 
  71.  WTX_CONTEXT_DESC. Changed wtxFuncCall() parameters to 
  72.  WTX_CONTEXT_DESC.
  73. 02a,26may95,s_w  add wtxSymListGet(), wtxSymRemove(), wtxEventpointList(),
  74.  wtxMemScan(), wtxVioFileList(), wtxContextExitNotifyAdd()
  75.  and correct the K&R prototype for wtxStrToEventType().
  76. 01z,22may95,s_w  add wtxTsRestart(), wtxVioChanGet() and wtxVioChanRelease().
  77. 01y,22may95,jcf  name revision.
  78. 01x,14may95,s_w  Removed use of WTX messages in API calls and added extra
  79.  target info routines. Use exchange API to make calls.
  80. 01w,15may95,c_s  added wtxEndian().
  81. 01v,04may95,s_w  major re-write for cleanup of WTX C library and addition
  82.  of error handling routines. Also restruction of headers.
  83. 01u,03may95,p_m  changed EVT_ to WTX_EVT_ and removed EVT_CALL_GOT_EXC
  84.  and EVT_BREAKPOINT.
  85. 01t,20apr95,p_m  integrated more WIN32 changes. added wtxShutdown().
  86. 01s,10apr95,p_m  moved event strings from "tsevt.h" and added EVT_TOOL_MSG.
  87.  added wtxMsgErrSet() that was removed by mistake.
  88. 01r,09apr95,s_w  correct prototype for wtxErrClear and wtxToolAttachHookSet
  89. 01q,09apr95,p_m  added missing prototypes and WTXC_EVT_TYPE.
  90. 01p,08apr95,p_m  completed C API.
  91. 01o,03mar95,p_m  added wtxMsgErrSet().
  92. 01n,28feb95,p_m  added WTX_MAX_SYM_CNT.
  93. 01m,23feb95,pad  changed WTX_MAX_SERVICE_CNT to 500.
  94. 01l,17feb95,p_m  changed delete to dlete in wtxExchangeInstall to please g++.
  95. 01k,08feb95,p_m  added MAX_OBJ_SEG_CNT and MAX_LD_M_SECTION_CNT taken from
  96.  xdrwtx.c. removed unnecessary constants.
  97.  made all limits prefix be WTX_MAX_.
  98. 01j,02feb95,p_m  merged all status in WTX_ERROR_T. 
  99. 01i,22jan95,jcf  added new status returns.
  100. 01h,20jan95,jcf  changed include to wtxtypes.h.
  101. 01g,20dec94,p_m  now use wtxrpc.h generated by rpcgen from wtx.x.
  102.  added S_wtx_AGENT_SERVICE_NOT_AVAIL.
  103.  added S_wtx_TARGET_NOT_ATTACHED.
  104. 01f,16nov94,p_m  added WTX_EVENT_ADD and wtxSvcInit().
  105.  removed S_wtx_NOT_ENOUGH_MEMORY. Changed errno numbers.
  106.  added S_wtx_NO_SCALABLE_AGENT and S_wtx_WIND_BASE_NOT_SET. 
  107. 01e,14nov94,p_m  changed WTX_VIO_OPEN to WTX_OPEN and WTX_VIO_CLOSE 
  108.  to WTX_CLOSE.  added S_wtx_INVALID_FLAGS.
  109. 01e,11nov94,p_m  changed WTX_EVAL_GOPHER to WTX_GOPHER_EVAL.
  110. 01d,27oct94,p_m  added WTX_CONTEXT_RESUME.
  111. 01c,24oct94,p_m  added WTX_FUNC_CALL_PRI.
  112. 01b,20oct94,p_m  added error codes.
  113. 01a,06oct94,p_m  written.
  114. */
  115. #ifndef __INCwtxh
  116. #define __INCwtxh 1
  117. #ifdef __cplusplus
  118. extern "C" {
  119. #endif
  120. #ifdef HOST
  121. #include <setjmp.h>
  122. #include "demanglerTypes.h"
  123. #else
  124. #include "vxWorks.h"
  125. #include "setjmp.h"
  126. #include "string.h"
  127. #include "stdio.h"
  128. #include "stdlib.h"
  129. #include "bootLib.h"
  130. #endif /* HOST */
  131. #include "wtxtypes.h"
  132. #include "wtxmsg.h"
  133. #include "wtxerr.h"
  134. /* defines */
  135. #define N_DASM_INST_DEFAULT     10      /* default # of disassembled insts   */
  136. #define WTX_ALL_EVENTS ~0 /* Number of events returned */
  137. #define WTX_LOG_NO_LIMIT 0 /* No max size for the log file */
  138. #define WTX_LOCK_FOREVER 0  /* Lock indefinitely the target server */
  139. #define LOAD_MODULE_INFO_ONLY   0x1000000       /* module synchronization */
  140. #define LOAD_IN_PROGRESS        0       /* load in progress*/
  141. #define LOAD_DONE               1       /* load finished (good or bad) */
  142. #define WTX_TRY(hWtx) 
  143. {
  144. WTX_HANDLER_T errHandler;
  145. jmp_buf jumpBuf;
  146. wtxErrClear (hWtx);
  147. errHandler = wtxErrHandlerAdd (hWtx, &wtxErrExceptionFunc, &jumpBuf);
  148. if (setjmp (jumpBuf) == 0)
  149. #define WTX_CATCH(hWtx, errCode) else if (wtxErrGet (hWtx) == errCode)
  150. #define WTX_CATCH_ALL(hWtx) else
  151. #define WTX_TRY_END(hWtx) 
  152. wtxErrHandlerRemove (hWtx, errHandler);
  153. }
  154. #define WTX_THROW(hWtx, errCode) wtxErrDispatch (hWtx, errCode)
  155. /* typedefs */
  156. typedef enum cpu_info /* available cpu information types */
  157.     {
  158.     CPU_INFO_NONE = 0, /* no info needed                  */
  159.     ARCH_DIR = 1, /* target architecture directory   */
  160.     LEADING_CHAR = 2, /* symbols prepended character     */
  161.     DEMANGLER = 3, /* target symbol demangler name    */
  162.     CPU_NAME = 4, /* target CPU name                 */
  163.     ARCH_OBJ_DIR = 5 /* target architecture object dir  */
  164.     } CPU_INFO;
  165. typedef struct cpu_info_type /* cpu info type               */
  166.     {
  167.     CPU_INFO param; /* parameter value             */
  168.     char * string; /* parameter associated string */
  169.     char * section; /* parameter section           */
  170.     } CPU_INFO_TYPE;
  171. typedef enum wtx_endian_t
  172.     {
  173.     WTX_ENDIAN_BIG = 0,
  174.     WTX_ENDIAN_LITTLE = 1,
  175.     WTX_ENDIAN_UNKNOWN = WTX_ERROR
  176.     } WTX_ENDIAN_T;
  177. typedef struct _wtx * HWTX; /* WTX Handle */
  178. typedef BOOL32 (*WTX_HANDLER_FUNC) (); 
  179. typedef struct _wtx_handler_t * WTX_HANDLER_T;
  180. /* XXX - expect typedefs below to move into wtxtypes.h or wtxmsg.h */
  181. typedef struct wtx_context_desc /* context creation desc. */
  182.     {
  183.     WTX_CONTEXT_TYPE contextType; /* context type */
  184.     WTX_RETURN_TYPE returnType; /* int or double */
  185.     char * name; /* name */
  186.     UINT32 priority; /* priority */
  187.     UINT32 options; /* options */
  188.     TGT_ADDR_T stackBase; /* base of stack */
  189.     UINT32 stackSize; /* stack size */
  190.     TGT_ADDR_T entry; /* context entry point */
  191.     INT32 redirIn; /* redir. in file or NULL */
  192.     INT32 redirOut; /* redir. out file or NULL */
  193.     TGT_ARG_T args[WTX_MAX_ARG_CNT]; /* arguments */
  194.     } WTX_CONTEXT_DESC;
  195. typedef struct wtx_evtpt_list   /* eventpoint list message */
  196.     {
  197.     UINT32 nEvtpt; /* num. eventpoint in list */
  198.     WTX_EVTPT * pEvtpt; /* eventpoint list */
  199.     } WTX_EVTPT_LIST;
  200. typedef struct wtx_evtpt_list_2 /* eventpoint list message */
  201.     {
  202.     UINT32              nEvtpt;         /* num. eventpoint in list */
  203.     WTX_EVTPT_INFO *    pEvtptInfo;     /* eventpoint info list */
  204.     } WTX_EVTPT_LIST_2;
  205.  
  206. typedef struct wtx_mem_info   /* memory information */
  207.     {
  208.     UINT32  curBytesFree; /* number of free bytes */
  209.     UINT32  curBytesAllocated; /* cur. # of bytes alloc. */
  210.     UINT32  cumBytesAllocated; /* cum. # of bytes alloc. */
  211.     UINT32  curBlocksFree; /* cur. # of free blocks */
  212.     UINT32  curBlocksAlloc; /* cur. # of blocks alloc. */
  213.     UINT32  cumBlocksAlloc; /* cum. # of blocks alloc. */
  214.     UINT32  avgFreeBlockSize; /* average free blocks size */
  215.     UINT32  avgAllocBlockSize; /* average alloc. blocks size */
  216.     UINT32  cumAvgAllocBlockSize; /* cum. avg alloc. block size */
  217.     UINT32  biggestBlockSize; /* size of biggest block */
  218.     void *  pReserved; /* reserved */
  219.     } WTX_MEM_INFO;
  220. typedef struct wtx_module_info /* object module information */
  221.     {
  222.     UINT32    moduleId; /* module Id */
  223.     char *    moduleName; /* module name */
  224.     char *    format; /* object file format */
  225.     UINT32    group; /* group number */
  226.     int    loadFlag; /* flags used to load mod. */
  227.     UINT32    nSegments; /* number of segments */
  228.     OBJ_SEGMENT * segment; /* segment description */
  229.     void *    pReserved; /* reserved */
  230.     } WTX_MODULE_INFO;
  231. typedef struct wtx_module_list /* object module list */
  232.     {
  233.     UINT32 numObjMod;  /* number of module in list */
  234.     UINT32 *   modIdList;  /* list of object module id */
  235.     } WTX_MODULE_LIST;
  236. typedef enum wtx_svr_type /* type of server to connect to      */
  237.     {
  238.     WTX_SVR_NONE = 0, /* no server to connect to           */
  239.     WTX_SVR_SERVER = 1, /* server is a target server         */
  240.     WTX_SVR_REGISTRY = 2 /* server is the registry            */
  241.     } WTX_SVR_TYPE;
  242. typedef struct wtx_ts_info /* TS information message */
  243.     {
  244.     WTX_TGT_LINK_DESC tgtLinkDesc; /* Target link descriptor */
  245.     WTX_TGT_INFO tgtInfo; /* info obtained from Target */
  246.     WTX_TOOL_DESC * pWtxToolDesc; /* info about attached Tools */
  247.     char * version; /* Target Server version */
  248.     char * userName; /* target server user name */
  249.     char * startTime; /* target server start time */
  250.     char * accessTime; /* target server access time */
  251.     char * lockMsg; /* lock/authorization message */
  252.     void * pReserved; /* reserved */
  253.     } WTX_TS_INFO;
  254. typedef struct wtx_load_report_info /* Progress info for async. loads */
  255.     {
  256.     int         loadState;      /*
  257.                                  * two value :
  258.                                  *  LOAD_IN_PROGRESS : 
  259.                                  *    - informations available in
  260.                                  *      PROGRESSINFO structure.
  261.                                  *  LOAD_DONE : 
  262.                                  *    - informations available in
  263.                                  *       MODULEINFO structure.
  264.                                  */
  265.     union       state_info
  266.         {
  267.         struct ld_m_file_desc /* object module file descriptor     */
  268.     {
  269.     char *              filename;       /* object file name          */
  270.     INT32               loadFlag;       /* behavior control flags    */
  271.     UINT32              moduleId;       /* module identifier         */
  272.     UINT32              nSections;      /* number of sections        */
  273.     LD_M_SECTION *      section;        /* section description       */
  274.     WTX_SYM_LIST        undefSymList;   /* list of undefined symbols */
  275.     } WTX_LD_M_FILE_DESC;
  276.         struct progress_info
  277.             {
  278.             int         state;          /* Current State                  */
  279.             int         maxValue;       /* Maximum value for this state   */
  280.             int         currentValue;   /* current value for this state   */
  281.             }   PROGRESS_INFO;
  282.         }       STATE_INFO;
  283.     }   WTX_LOAD_REPORT_INFO;
  284. /* globals */
  285. #ifndef HOST
  286. /* externals */
  287. extern BOOT_PARAMS sysBootParams;
  288. #endif /* HOST */
  289. /* function declarations */
  290. extern char * wtxCpuInfoGet
  291.     (
  292.     int cpuNum, /* cpu number to get info on */
  293.     CPU_INFO cpuInfoType /* cpu info type to get      */
  294.     );
  295. extern STATUS wtxEach /* examine each WTX-registered service*/
  296.     (
  297.     HWTX hWtx, /* WTX API handle */
  298.     const char * namePat, /* reg expression to match svc name */
  299.     const char * typePat, /* reg expression to match svc type */
  300.     const char * keyPat, /* reg expression to match svc key */
  301.     FUNCPTR routine, /* func to call for each svc entry */
  302.     void * arg /* arbitrary user-supplied arg */
  303.     );
  304. extern WTX_DESC * wtxInfo /* return service descriptor */
  305.     (
  306.     HWTX hWtx, /* WTX API handle */
  307.     const char * name /* service name to lookup */
  308.     );
  309. extern WTX_DESC_Q * wtxInfoQ /* return list of registred services */
  310.     (
  311.     HWTX hWtx, /* WTX API handle */
  312.     const char * namePat, /* reg expression to match svc name */
  313.     const char * typePat, /* reg expression to match svc type */
  314.     const char * keyPat /* reg expression to match svc key */
  315.     );
  316. extern STATUS wtxInitialize /* init to be called by WTX client */
  317.     (
  318.     HWTX * phWtx /* handle to use in next API calls */
  319.     );
  320. extern STATUS wtxProbe /* probe to see if registry is running*/
  321.     (
  322.     HWTX hWtx /* WTX API handle */
  323.     );
  324. extern WTX_DESC * wtxRegister /* register for a service */
  325.     (
  326.     HWTX hWtx, /* WTX API handle */
  327.     const char * name,  /* service name, NULL to be named */
  328.     const char * type, /* service type, NULL for unspecified */
  329.     const char * key /* unique service key */
  330.     );
  331. extern STATUS wtxTerminate /* terminate use of WTX client handle */
  332.     (
  333.     HWTX hWtx /* WTX API handle */
  334.     );
  335. extern STATUS wtxTimeoutSet /* set WTX timeout */
  336.     (
  337.     HWTX hWtx, /* WTX API handle */
  338.     UINT32 msec /* New timeout value in milliseconds */
  339.     );
  340. extern STATUS wtxTimeoutGet /* get the current timeout */
  341.     (
  342.     HWTX hWtx, /* WTX API handle */
  343.     UINT32 * pMsec /* Pointer to timeout value in ms */
  344.     );
  345. extern STATUS wtxUnregister /* unregister for descriptor */
  346.     (
  347.     HWTX hWtx, /* WTX API handle */
  348.     const char * name /* service unregister, NULL for self */
  349.     );
  350. extern STATUS wtxAgentModeSet /* set the mode of the target agent */
  351.     (
  352.     HWTX hWtx, /* WTX API handle */
  353.     WTX_AGENT_MODE_TYPE agentMode /* debug agent mode */
  354.     );
  355. extern WTX_AGENT_MODE_TYPE wtxAgentModeGet /* get agent mode */
  356.     (
  357.     HWTX hWtx /* WTX API handle */
  358.     );
  359. extern STATUS   wtxAsyncNotifyEnable    /* start async. event notification */
  360.     (
  361.     HWTX                hWtx,           /* WTX API handle */
  362.     FUNCPTR             pFunc           /* user defined hook routine */
  363.     );
  364. extern STATUS   wtxAsyncNotifyDisable   /* stop async. event notification */
  365.     (
  366.     HWTX                hWtx            /* WTX API handle */
  367.     );
  368. extern WTX_EVENT_DESC * wtxAsyncEventGet
  369.     (
  370.     HWTX hWtx /* WTX API handle */
  371.     );
  372. extern STATUS wtxAsyncResultFree
  373.     (
  374.     HWTX hWtx, /* WTX API handle */
  375.     WTX_EVENT_DESC * pEventDesc /* pointer to struct. to free */
  376.     );
  377. extern UINT32 wtxBreakpointAdd /* create a new event point */
  378.     (
  379.     HWTX hWtx, /* WTX API handle */
  380.     WTX_CONTEXT_TYPE contextType, /* type of context to put bp in */
  381.     WTX_CONTEXT_ID_T contextId, /* associated context */
  382.     TGT_ADDR_T tgtAddr /* breakpoint address */
  383.     );
  384. extern STATUS wtxCacheTextUpdate        /* Update the target text cache */
  385.     (
  386.     HWTX                hWtx,           /* WTX API handle */
  387.     TGT_ADDR_T          addr,           /* start address  */
  388.     UINT32              nBytes          /* how many ?     */
  389.     );
  390. extern STATUS wtxClientDataGet /* get the client data */
  391.     (
  392.     HWTX hWtx, /* WTX API handle */
  393.     void ** ppClientData /* pointer to client data pointer */
  394.     );
  395. extern STATUS wtxClientDataSet /* set client data */
  396.     (
  397.     HWTX hWtx, /* WTX API handle */
  398.     void * pClientData /* value to associate with handle */
  399.     );
  400. extern INT32 wtxConsoleCreate /* create a console window (UNIX) */
  401.      (
  402.      HWTX hWtx, /* WTX API handle */
  403.      const char * name,  /* Name of console window */
  404.      const char * display, /* Display name eg: host:0 */
  405.      INT32 * fdIn, /* RETURN: input file descriptor */
  406.      INT32 * fdOut /* RETURN: output file descriptor */
  407.      );
  408. extern STATUS wtxConsoleKill /* kill console (UNIX) */
  409.     (
  410.     HWTX hWtx, /* WTX API handle */
  411.     INT32 consoleId /* id of console to destroy */
  412.     );
  413. extern STATUS wtxContextCont /* continue execution of target ctxt */
  414.     (
  415.     HWTX hWtx, /* WTX API handle */
  416.     WTX_CONTEXT_TYPE contextType, /* type of context to continue */
  417.     WTX_CONTEXT_ID_T contextId /* id of context to continue */
  418.     );
  419. extern WTX_CONTEXT_ID_T wtxContextCreate /* create a ctxt on target */
  420.     (
  421.     HWTX hWtx, /* WTX API handle */
  422.     WTX_CONTEXT_DESC * pContextDesc /* context descriptor */
  423.     );
  424. extern UINT32 wtxContextExitNotifyAdd /* add exit evpt notification */
  425.     (
  426.     HWTX hWTx,  /* WTX API handle */
  427.     WTX_CONTEXT_TYPE contextType, /* type of context */
  428.     WTX_CONTEXT_ID_T contextId /* associated context */
  429.     );
  430. extern STATUS wtxContextKill /* kill a target context */
  431.     (
  432.     HWTX hWtx, /* WTX API handle */
  433.     WTX_CONTEXT_TYPE contextType, /* type of context to kill */
  434.     WTX_CONTEXT_ID_T contextId /* id of context to kill */
  435.     );
  436. extern STATUS wtxContextResume /* resume execution of a target ctxt */
  437.     (
  438.     HWTX hWtx, /* WTX API handle */
  439.     WTX_CONTEXT_TYPE contextType, /* type of context to resume */
  440.     WTX_CONTEXT_ID_T contextId /* id of context to resume */
  441.     );
  442. extern STATUS wtxContextStep /* single step exec of target ctxt */
  443.     (
  444.     HWTX hWtx, /* WTX API handle */
  445.     WTX_CONTEXT_TYPE contextType, /* type of context to resume */
  446.     WTX_CONTEXT_ID_T contextId,  /* id of context to step */
  447.     TGT_ADDR_T stepStart, /* stepStart pc value */
  448.     TGT_ADDR_T stepEnd /* stepEnd PC vale */
  449.     );
  450. extern STATUS wtxContextSuspend /* suspend a target context */
  451.     (
  452.     HWTX hWtx, /* WTX API handle */
  453.     WTX_CONTEXT_TYPE contextType, /* type of context to suspend */
  454.     WTX_CONTEXT_ID_T contextId /* id of context being suspended */
  455.     );
  456. extern STATUS wtxErrClear /* clear any error for the tool */
  457.     (
  458.     HWTX hWtx /* WTX API handle */
  459.     );
  460. extern WTX_ERROR_T wtxErrGet /* return the last error for a handle */
  461.     (
  462.     HWTX hWtx /* WTX API handle */
  463.     );
  464. extern STATUS wtxErrSet /* set the error code for the handle */
  465.     (
  466.     HWTX hWtx, /* WTX API handle */
  467.     UINT32 errCode /* error value to set */
  468.     );
  469. extern const char * wtxErrMsgGet /* fetch last WTX API error string */
  470.     (
  471.     HWTX hWtx /* WTX API handle */
  472.     );
  473. extern const char * wtxErrToMsg /* convert error code to string */
  474.     (
  475.     HWTX hWtx, /* WTX API handle */
  476.     WTX_ERROR_T errCode /* error code to convert */
  477.     );
  478. extern STATUS wtxErrDispatch /* dispatch error with supplied code */
  479.     (
  480.     HWTX hWtx, /* WTX API handle */
  481.     WTX_ERROR_T errCode /* error code to register */
  482.     );
  483. extern BOOL32 wtxErrExceptionFunc /* a function to handle an error */
  484.     (
  485.     HWTX hWtx, /* WTX API handle */
  486.     void * pClientData, /* pointer to a jump buffer */
  487.     void * pCallData /* error code to return via setjmp() */
  488.     );
  489. extern WTX_HANDLER_T wtxErrHandlerAdd /* add an error handler */
  490.     (
  491.     HWTX hWtx, /* WTX API handle */
  492.     WTX_HANDLER_FUNC pFunc, /* function to call on error */
  493.     void * pClientData /* data to pass function */
  494.     );
  495. extern STATUS wtxErrHandlerRemove /* remove error handler for WTX handle*/
  496.     (
  497.     HWTX hWtx, /* WTX API handle */
  498.     WTX_HANDLER_T pHandler /* error handler */
  499.     );
  500. extern STATUS wtxEventAdd /* send an event to the target server */
  501.     (
  502.     HWTX hWtx, /* WTX API handle */
  503.     const char * event,  /* event string to send */
  504.     UINT32 addlDataLen, /* length of addl data block in bytes */
  505.     const void * pAddlData /* pointer to additional data */
  506.     );
  507. extern WTX_EVENT_DESC * wtxEventGet /* get an event from the target */
  508.     (
  509.     HWTX hWtx /* WTX API handle */
  510.     );
  511. extern WTX_EVENT_NODE * wtxEventListGet /* Get all the events in one call */
  512.     (
  513.     HWTX                hWtx,           /* WTX API handle */
  514.     UINT32              nEvents         /* Number of events to return */
  515.     );
  516. extern UINT32 wtxEventpointAdd /* Create a new event point */
  517.     (
  518.     HWTX                hWtx, /* WTX API handle */
  519.     WTX_EVTPT_2 * pEvtpt /* eventpoint descriptor */
  520.     );
  521. extern UINT32 wtxHwBreakpointAdd /* Create a new hardware breakpoint  */
  522.     (
  523.     HWTX                hWtx, /* WTX API handle */
  524.     WTX_CONTEXT_TYPE contextType, /* type of context to put bp in */
  525.     WTX_CONTEXT_ID_T contextId, /* associated context */
  526.     TGT_ADDR_T tgtAddr, /* breakpoint address */
  527.     TGT_INT_T type /* access type (arch dependant) */
  528.     );
  529. extern STATUS wtxEventpointDelete /* delete eventpoint from the target */
  530.     (
  531.     HWTX hWtx, /* WTX API handle */
  532.     UINT32 evtptId /* ID of eventpoint to delete */
  533.     );
  534. extern WTX_EVTPT_LIST * wtxEventpointList  /* list evpts on target server*/
  535.     (
  536.     HWTX hWtx /* WTX API handle */
  537.     );
  538. extern WTX_EVTPT_LIST_2 * wtxEventpointListGet /* list evpts on TS */ 
  539.     (
  540.     HWTX                hWtx            /* WTX API handle */
  541.     );
  542. extern STATUS wtxFileClose /* close a file on the target server */
  543.     (
  544.     HWTX hWtx, /* WTX API handle */
  545.     INT32 fileDescriptor /* file to close descriptor */
  546.     );
  547. extern INT32 wtxFileOpen /* open a file on the target server */
  548.     (
  549.     HWTX hWtx, /* WTX API handle */
  550.     const char * fileName,  /* file name */
  551.     WTX_OPEN_FLAG flags, /* unix style flags */
  552.     INT32 mode, /* unix style mode */
  553.     INT32 channel /* channel id for redirection */
  554.     );
  555. extern WTX_CONTEXT_ID_T wtxFuncCall /* call a function on the target */
  556.     (
  557.     HWTX hWtx, /* WTX API handle */
  558.     WTX_CONTEXT_DESC * pContextDesc /* pointer to call descriptor */
  559.     ); 
  560. extern STATUS wtxDirectCall /* call func on target within agent */
  561.     (
  562.     HWTX hWtx, /* WTX API handle */
  563.     TGT_ADDR_T entry, /* function address */
  564.     void * pRetVal, /* pointer to return value */
  565.     TGT_ARG_T arg0, /* function argument 1 */
  566.     TGT_ARG_T arg1, /* function argument 2 */
  567.     TGT_ARG_T arg2, /* function argument 3 */
  568.     TGT_ARG_T arg3, /* function argument 4 */
  569.     TGT_ARG_T arg4, /* function argument 5 */
  570.     TGT_ARG_T arg5, /* function argument 6 */
  571.     TGT_ARG_T arg6, /* function argument 7 */
  572.     TGT_ARG_T arg7, /* function argument 8 */
  573.     TGT_ARG_T arg8, /* function argument 9 */
  574.     TGT_ARG_T arg9 /* function argument 10 */
  575.     ); 
  576. extern WTX_GOPHER_TAPE * wtxGopherEval /* evaluate Gopher string on target */
  577.     (
  578.     HWTX hWtx, /* WTX API handle */
  579.     const char * inputString /* Gopher program to evaluate */
  580.     );
  581. extern STATUS wtxLogging                /* WDB/WTX logging facilities */
  582.     (
  583.     HWTX        hWtx,                   /* WTX API handle     */
  584.     int         type,                   /* WDB or WTX logging */
  585.     int         action,                 /* Logging ON or OFF  */
  586.     char *      fileName,               /* Logging file name  */
  587.     int         maxSize,                /* log file max size  */
  588.     char * filter /* Request filter     */
  589.     );
  590. extern WTX_MEM_INFO * wtxMemInfoGet /* get info about memory pool */
  591.     (
  592.     HWTX hWtx /* WTX API handle */
  593.     );
  594. extern STATUS wtxMemAddToPool /* add memory to the agent pool */
  595.     (
  596.     HWTX hWtx, /* WTX API handle */
  597.     TGT_ADDR_T address, /* base of memory block to add */
  598.     UINT32 size /* size of memory block to add */
  599.     );
  600. extern TGT_ADDR_T wtxMemAlign /* allocate aligned target memory */
  601.     (
  602.     HWTX hWtx, /* WTX API handle */
  603.     TGT_ADDR_T alignment,  /* alignment boundary */
  604.     UINT32 numBytes /* size of block to allocate */
  605.     );
  606. extern TGT_ADDR_T wtxMemAlloc /* alloc blocks in memory pool */
  607.     (
  608.     HWTX hWtx, /* WTX API handle */
  609.     UINT32 numBytes /* size to allocate in bytes */
  610.     );
  611. extern UINT32 wtxMemChecksum /* perform checksum on target memory */
  612.     (
  613.     HWTX hWtx, /* WTX API handle */
  614.     TGT_ADDR_T startAddr,  /* remote addr to start checksum at */
  615.     UINT32 numBytes /* number of bytes to checksum */
  616.     );
  617. extern WTX_DASM_INST_LIST * wtxMemDisassemble /* disassemble memory */
  618.     (
  619.     HWTX hWtx, /* WTX API handle */
  620.     TGT_ADDR_T startAddr, /* Inst address to match */
  621.     UINT32 nInst, /* number of instructions to get */
  622.     TGT_ADDR_T endAddr, /* Last address to match */
  623.     BOOL32 printAddr, /* if instruction's address appended */
  624.     BOOL32 printOpcodes, /* if instruction's opcodes appended */
  625.     BOOL32 hexaAddr /* for hex  adress representation */
  626.     );
  627. extern STATUS wtxMemFree /* free a block of target memory */
  628.     (
  629.     HWTX hWtx, /* WTX API handle */
  630.     TGT_ADDR_T address /* target mem block address to free */
  631.     );
  632. extern STATUS wtxMemMove /* move a block of target memory */
  633.     (
  634.     HWTX hWtx, /* WTX API handle */
  635.     TGT_ADDR_T srcAddr, /* remote addr to move from */
  636.     TGT_ADDR_T destAddr, /* remote addr to move to */
  637.     UINT32 numBytes /* number of bytes to move */
  638.     );
  639. extern UINT32 wtxMemRead /* read memory from the target */
  640.     (
  641.     HWTX hWtx, /* WTX API handle */
  642.     TGT_ADDR_T fromAddr, /* Target addr to read from */
  643.     void * toAddr, /* Local addr to read to */
  644.     UINT32 numBytes /* Bytes to read */
  645.     );
  646. extern UINT32 wtxMemWidthRead           /* read memory on <width> bytes */
  647.     (
  648.     HWTX                hWtx,           /* WTX API handle */
  649.     TGT_ADDR_T          fromAddr,       /* Target addr to read from */
  650.     void *              toAddr,         /* Local addr to read to */
  651.     UINT32              numBytes,       /* Bytes to read */
  652.     UINT8               width           /* width to read */
  653.     );
  654. extern TGT_ADDR_T wtxMemRealloc /* reallocate a block of target mem */
  655.     (
  656.     HWTX hWtx, /* WTX API handle */
  657.     TGT_ADDR_T address,  /* memory block to reallocate */
  658.     UINT32 numBytes /* new size */
  659.     );
  660. extern UINT32 wtxMemSet /* set target memory to given value */
  661.     (
  662.     HWTX hWtx, /* WTX API handle */
  663.     TGT_ADDR_T addr, /* remote addr to write to */
  664.     UINT32 numBytes,  /* number of bytes to set */
  665.     UINT32 val /* value to set */
  666.     );
  667. extern STATUS wtxMemScan /* scan target memory for pattern */
  668.     (
  669.     HWTX hWtx, /* WTX API handle */
  670.     BOOL32 match, /* Match/Not-match pattern boolean */
  671.     TGT_ADDR_T startAddr,  /* Target address to start scan */
  672.     TGT_ADDR_T endAddr, /* Target address to finish scan */
  673.     UINT32 numBytes,  /* Number of bytes in pattern */
  674.     void * pattern, /* Pointer to pattern to search for */
  675.     TGT_ADDR_T * pResult /* Pointer to result address */
  676.     );
  677. extern UINT32 wtxMemWrite /* write memory on the target */
  678.     (
  679.     HWTX hWtx, /* WTX API handle */
  680.     void * fromAddr, /* Local addr to write from */
  681.     TGT_ADDR_T toAddr, /* Remote addr to write to */
  682.     UINT32 numBytes /* Bytes to read */
  683.     );
  684. extern UINT32 wtxMemWidthWrite          /* write memory on the target */
  685.     (
  686.     HWTX                hWtx,           /* WTX API handle */
  687.     void *              fromAddr,       /* Local addr to write from */
  688.     TGT_ADDR_T          toAddr,         /* Remote addr to write to */
  689.     UINT32              numBytes,       /* Bytes to read */
  690.     UINT8               width           /* Width to read */
  691.     );
  692. extern STATUS wtxObjModuleChecksum      /* Checks validity of target memory */
  693.     (
  694.     HWTX                hWtx,           /* WTX API handle */
  695.     INT32               moduleId,       /* Module Id      */
  696.     char *              fileName        /* Module name    */
  697.     );
  698. extern char * wtxObjModuleFindName /* find obj module name given its ID */
  699.     (
  700.     HWTX hWtx, /* WTX API handle */
  701.     UINT32 modId /* id of module to find obj name of */
  702.     );
  703. extern UINT32 wtxObjModuleFindId /* find obj module IF from name */
  704.     (
  705.     HWTX hWtx, /* WTX API handle */
  706.     const char * name /* object module file name */
  707.     );
  708. extern WTX_MODULE_INFO * wtxObjModuleInfoGet /* give info on obj module */
  709.     (
  710.     HWTX hWtx, /* WTX API handle */
  711.     UINT32 modId /* id of module to look for */
  712.     );
  713. extern WTX_MODULE_INFO * wtxObjModuleInfoAndPathGet /* give info on obj module */
  714.     (
  715.     HWTX hWtx, /* WTX API handle */
  716.     UINT32 modId /* id of module to look for */
  717.     );
  718. extern WTX_MODULE_LIST * wtxObjModuleList /* list loaded obj modules */
  719.     (
  720.     HWTX hWtx /* WTX API handle */
  721.     );
  722. extern WTX_LD_M_FILE_DESC * wtxObjModuleLoad /* load a new object module */
  723.     (
  724.     HWTX hWtx, /* WTX API handle */
  725.     WTX_LD_M_FILE_DESC * pFileDesc /* module descriptor */
  726.     );
  727. extern STATUS wtxObjModuleLoadStart /* asynchronous load */
  728.     (
  729.     HWTX                        hWtx,           /* WTX API handle    */
  730.     WTX_LD_M_FILE_DESC *        pFileDesc       /* Module descriptor */
  731.     );
  732. extern WTX_LOAD_REPORT_INFO * wtxObjModuleLoadProgressReport /* load status */
  733.     (
  734.     HWTX                        hWtx    /* WTX API handle    */
  735.     );
  736. extern STATUS wtxObjModuleLoadCancel /* cancel an async. load */
  737.     (
  738.     HWTX                        hWtx    /* WTX API handle    */
  739.     );
  740. extern STATUS wtxObjModuleUnload /* unload an obj module from target */
  741.     (
  742.     HWTX hWtx, /* WTX API handle */
  743.     UINT32 modId /* id of module to unload */
  744.     );
  745. extern STATUS wtxObjModuleByNameUnload  /* Unload an obj. mod. from target */
  746.     (
  747.     HWTX                hWtx,           /* WTX API handle             */
  748.     char *              name            /* Name of module to look for */
  749.     );
  750. extern STATUS wtxRegisterForEvent /* send events matching expression */
  751.     (
  752.     HWTX hWtx, /* WTX API handle */
  753.     const char * regExp /* Regular expr to select events */
  754.     );
  755. extern STATUS wtxRegsGet /* read register data from the target */
  756.     (
  757.     HWTX hWtx, /* WTX API handle */
  758.     WTX_CONTEXT_TYPE contextType, /* context type to get regs of */
  759.     WTX_CONTEXT_ID_T contextId, /* context id to get regs of */
  760.     WTX_REG_SET_TYPE regSet, /* type of register set */
  761.     UINT32 firstByte, /* first byte of register set */
  762.     UINT32 numBytes, /* number of bytes of register set */
  763.     void * regMemory /* place holder for reg. values */
  764.     );
  765. extern STATUS wtxRegsSet /* write to registers on the target */
  766.     (
  767.     HWTX hWtx, /* WTX API handle */
  768.     WTX_CONTEXT_TYPE contextType, /* context type to set regs of */
  769.     WTX_CONTEXT_ID_T contextId, /* context id to set regs of */
  770.     WTX_REG_SET_TYPE regSet, /* type of register set */
  771.     UINT32 firstByte, /* first byte of reg. set */
  772.     UINT32 numBytes, /* number of bytes in reg. set. */
  773.     void * regMemory /* register contents */
  774.     );
  775. extern void wtxSymListFree
  776.     (
  777.     WTX_SYM_LIST * pSymList /* symbol list to free */
  778.     );
  779. extern STATUS wtxResultFree /* free mem allocated by WTX API call */
  780.     (
  781.     HWTX hWtx, /* WTX API handle */
  782.     void * pResult /* pointer to WTX result structure */
  783.     );
  784. extern STATUS wtxServiceAdd /* add a new service to the agent */
  785.     (
  786.     HWTX hWtx, /* WTX API handle */
  787.     UINT32 * wtxSvcNum, /* where to return WTX RPC serv num */
  788.     UINT32 wdbSvcNum, /* WDB RPC service number */
  789.     char * wdbName, /* WDB service name */
  790.     char * wdbObjFile, /* WDB service object module */
  791.     char * wdbInitRtn, /* WDB svc init routine name */
  792.     char * wtxObjFile, /* WTX xdr/service DLL file */
  793.     char * wtxName, /* WTX service routine name */
  794.     char * wtxInProcName, /* WTX service input xdr proc name */
  795.     char * wtxOutProcName /* WTX service output xdr proc name */
  796.     );
  797. extern TGT_ADDR_T wtxStrToTgtAddr /* convert str to a TGT_ADDR_T */
  798.     (
  799.     HWTX hWtx, /* WTX API handle */
  800.     const char * str /* string to convert */
  801.     );
  802. extern INT32 wtxStrToInt32 /* convert str to an INT32 */
  803.     (
  804.     HWTX hWtx, /* WTX API handle */
  805.     const char * str /* string to convert */
  806.     );
  807. extern WTX_CONTEXT_ID_T wtxStrToContextId /* convert str to ctxt ID */
  808.     (
  809.     HWTX hWtx, /* WTX API handle */
  810.     const char * str /* string to convert */
  811.     );
  812. extern WTX_CONTEXT_TYPE wtxStrToContextType /* convert str ton ctxt type */
  813.     (
  814.     HWTX hWtx, /* WTX API handle */
  815.     const char * str /* string to convert */
  816.     );
  817. extern WTX_EVENT_TYPE wtxStrToEventType /* convert string to event type */
  818.     (
  819.     HWTX hWtx, /* WTX API handle */
  820.     const char * str /* string to convert */
  821.     );
  822. const char * wtxEventToStrType /* convert event type to a string */
  823.     (
  824.     WTX_EVENT_TYPE event /* WTX Event */
  825.     );
  826. extern STATUS wtxSymAdd /* add symbol with given params */
  827.     (
  828.     HWTX hWtx, /* WTX API handle */
  829.     const char * symName,  /* name of symbol to add */
  830.     TGT_ADDR_T symValue, /* value of symbol to add */
  831.     UINT8 symType /* type of symbol to add */
  832.     ); 
  833. extern STATUS wtxSymAddWithGroup /* add symbol with given group */
  834.     (
  835.     HWTX hWtx, /* WTX API handle */
  836.     const char * symName, /* name of symbol to add */
  837.     TGT_ADDR_T symValue, /* value of symbol to add */
  838.     UINT8 symType, /* type of symbol to add */
  839.     UINT16 group /* group of symbol to add */
  840.     ); 
  841. extern WTX_SYMBOL * wtxSymFind /* find info on symbol */
  842.     (
  843.     HWTX hWtx, /* WTX API handle */
  844.     const char * symName, /* name of symbol */
  845.     TGT_ADDR_T symValue, /* value of symbol */
  846.     BOOL32 exactName, /* must match name exactly */
  847.     UINT8 symType, /* type of symbol */
  848.     UINT8 typeMask /* mask to select type bits */
  849.     );
  850. extern WTX_SYM_LIST * wtxSymListGet /* get list of symbols */
  851.     (
  852.     HWTX hWtx, /* WTX API handle */
  853.     const char * string, /* string to match */
  854.     const char * moduleNameOrId, /* Module name to search in */
  855.     TGT_ADDR_T value, /* Symbol value to match */
  856.     BOOL32 listUnknown /* List unknown symbols only flag */
  857.     );
  858. extern WTX_SYM_LIST * wtxSymListByModuleIdGet /* get list of symbols */
  859.     (
  860.     HWTX                hWtx, /* WTX API handle */
  861.     const char *        string, /* string to match */
  862.     UINT32 moduleId, /* Module Id to search in */
  863.     TGT_ADDR_T          value, /* Symbol value to match */
  864.     BOOL32              listUnknown /* List unknown symbols only flag */
  865.     );
  866. extern WTX_SYM_LIST * wtxSymListByModuleNameGet /* get list of symbols */
  867.     (
  868.     HWTX                hWtx, /* WTX API handle */
  869.     const char *        string, /* string to match */
  870.     const char *        moduleName, /* Module name to search in */
  871.     TGT_ADDR_T          value, /* Symbol value to match */
  872.     BOOL32              listUnknown /* List unknown symbols only flag */
  873.     );
  874. extern STATUS wtxSymRemove /* remove a symbol from sym table */
  875.     (
  876.     HWTX hWtx, /* WTX API handle */
  877.     const char * symName, /* Name of symbol to remove */
  878.     UINT8 symType /* Type of symbol to remove */
  879.     );
  880. extern WTX_SYM_TBL_INFO * wtxSymTblInfoGet /* return sym table info */
  881.     (
  882.     HWTX hWtx /* WTX API handle */
  883.     );
  884. extern INT32 wtxTargetRtTypeGet /* get the target-runtime-type info */
  885.     (
  886.     HWTX hWtx /* WTX API handle */
  887.     );
  888. extern const char * wtxTargetRtVersionGet /* get target-runtime version */
  889.     (
  890.     HWTX hWtx /* WTX API handle */
  891.     );
  892. extern INT32 wtxTargetCpuTypeGet /* get the target CPU type code */
  893.     (
  894.     HWTX hWtx /* WTX API handle */
  895.     );
  896. extern BOOL32 wtxTargetHasFppGet /* check for floating point processor */
  897.     (
  898.     HWTX hWtx /* WTX API handle */
  899.     );
  900. extern BOOL32 wtxTargetHasAltivecGet /* check for altivec processor */
  901.     (
  902.     HWTX hWtx /* WTX API handle */
  903.     );
  904. extern WTX_ENDIAN_T wtxTargetEndianGet /* get edianness of target */
  905.     (
  906.     HWTX hWtx /* WTX API handle */
  907.     );
  908. extern const char * wtxTargetBootlineGet /* get target boot line info */
  909.     (
  910.     HWTX hWtx /* WTX API handle */
  911.     );
  912. extern const char * wtxTargetBspNameGet /* get the BSP name string */
  913.     (
  914.     HWTX hWtx /* WTX API handle */
  915.     );
  916. extern STATUS wtxTargetReset /* reset the target */
  917.     (
  918.     HWTX hWtx /* WTX API handle */
  919.     );
  920. extern UINT32 wtxTargetIpAddressGet /* get the target IP address */
  921.     (
  922.     HWTX hWtx /* WTX API handle */
  923.     );
  924. extern char * wtxTargetToolNameGet/* get the target tool name */
  925.     (
  926.     HWTX hWtx /* WTX API handle */
  927.     );
  928. extern STATUS wtxTargetAttach /* reattach to the target */
  929.     (
  930.     HWTX hWtx /* WTX API handle */
  931.     );
  932. extern STATUS wtxToolAttach /* connect client to target server */
  933.     (
  934.     HWTX hWtx, /* WTX API handle */
  935.     const char * targetName, /* Target Server name */
  936.     const char * toolName /* tool name */
  937.     );
  938. extern char * wtxToolNameGet /* return name of current tool */
  939.     (
  940.     HWTX hWtx /* WTX API handle */
  941.     );
  942. extern BOOL32 wtxToolConnected /* check tool connection to server */
  943.     (
  944.     HWTX hWtx /* WTX API handle */
  945.     );
  946. extern STATUS wtxToolDetach /* detach from the target server */
  947.     (
  948.     HWTX hWtx /* WTX API handle */
  949.     );
  950. extern UINT32 wtxToolIdGet /* return tool ID of current tool */
  951.     (
  952.     HWTX hWtx /* WTX API handle */
  953.     );
  954. extern WTX_TS_INFO * wtxTsInfoGet /* get info about target and server */
  955.     (
  956.     HWTX hWtx /* WTX API handle */
  957.     );
  958. extern STATUS wtxTsKill /* kill the target server */
  959.     (
  960.     HWTX hWtx /* WTX API handle */
  961.     );
  962. extern STATUS wtxTsLock /* lock server for exclusive access */
  963.     (
  964.     HWTX hWtx /* WTX API handle */
  965.     );
  966. extern STATUS wtxTsTimedLock /* lock target server a limited time */
  967.     (
  968.     HWTX hWtx, /* WTX API handle */
  969.     UINT32 seconds /* duration of lock */
  970.     );
  971. extern const char * wtxTsNameGet /* get target server name */
  972.     (
  973.     HWTX hWtx /* WTX API handle */
  974.     );
  975. extern STATUS wtxTsRestart /* restart the target server */
  976.     (
  977.     HWTX hWtx /* WTX API handle */
  978.     );
  979. extern STATUS wtxTsUnlock /* unlock the connected target server */
  980.     (
  981.     HWTX hWtx /* WTX API handle */
  982.     );
  983. extern STATUS wtxUnregisterForEvent     /* Unregister for some events */
  984.     (
  985.     HWTX                hWtx,           /* WTX API handle */
  986.     char *              regExp          /* regexp for the unwanted events */
  987.     );
  988. extern BOOL32 wtxVerify /* verify WTX handle is valid for use */
  989.     (
  990.     HWTX hWtx /* WTX API handle */
  991.     );
  992. extern INT32 wtxVioChanGet /* get a virtual I/O channel number */
  993.     (
  994.     HWTX hWtx /* WTX API handle */
  995.     );
  996. extern STATUS wtxVioChanRelease /* release a virtual I/O channel */
  997.     (
  998.     HWTX hWtx, /* WTX API handle */
  999.     INT32 channel /* the channel number to release */
  1000.     );
  1001. extern STATUS wtxVioCtl /* poerform control operation on VIO */
  1002.     (
  1003.     HWTX hWtx, /* WTX API handle */
  1004.     INT32 channel, /* channel to do control operation on */
  1005.     UINT32 request, /* control operation to perform */
  1006.     UINT32 arg /* arg for call */
  1007.     );
  1008. extern WTX_VIO_FILE_DESC ** wtxVioFileList /* list server files */
  1009.     (
  1010.     HWTX hWtx /* WTX API handle */
  1011.     );
  1012. extern UINT32 wtxVioWrite /* write data to a VIO channel */
  1013.     (
  1014.     HWTX hWtx, /* WTX API handle */
  1015.     INT32 channel, /* channel to write to */
  1016.     void * pData, /* pointer to data to write */
  1017.     UINT32 numBytes /* number of bytes of data to write */
  1018.     );
  1019. extern char * wtxTsVersionGet /* return the Tornado version */
  1020.     (
  1021.     HWTX hWtx /* WTX API handle */
  1022.     );
  1023. #if (defined (WIN32))
  1024. long wtxEnvironRegistryOptionsGet
  1025.     (
  1026.     HKEY hKey, /* Win32 registry key handler         */
  1027.     char * dbDir, /* Tornado registry DB directory      */
  1028.     int * pPingDelay, /* target server ping delay           */
  1029.     int * pNUnsuccessPing, /* target server max unsuccess ping   */
  1030.     BOOL * pUsePmap /* do we use port mapper ?            */
  1031.     );
  1032. #endif /* WIN32 */
  1033. #ifdef HOST
  1034. extern DEMANGLER_STYLE wtxDefaultDemanglerStyle  /* appropriate demangling style for target tool */
  1035.     (
  1036.     HWTX hWtx                           /* WTX API handle */
  1037.     );
  1038. extern const char * wtxTargetToolFamilyGet /* returns toolchain family (e.g. "gnu" or "diab") */
  1039.     (
  1040.     HWTX hWtx                           /* WTX API handle */
  1041.     );
  1042. #endif
  1043. #ifdef __cplusplus
  1044. }
  1045. #endif
  1046. #endif /* __INCwtxh */