Tornado API Reference : WTX Tcl Library

wtxtcl Library Part I [Tcl]

NAME

wtxtcl Library Part I [Tcl] - wtxtcl Library part I

TCL PROCEDURES

wtxContextCreate - create a new context on the target
wtxContextKill - kill a context
wtxContextSuspend - suspend a context
wtxContextStatusGet - get the status of a context
wtxContextCont - continue a context stopped at a breakpoint
wtxContextResume - resume a suspended context
wtxContextStep - single step a context by machine instruction
wtxSymFind - locate a symbol in the symbol table
wtxSymAdd - add a new symbol to the symbol table
wtxSymRemove - remove a symbol from the symbol table
wtxSymTblInfoGet - return information about the target server symbol table
wtxObjModuleList - fetch a list of IDs of object modules loaded on the target
wtxObjModuleInfoGet - return information about an object module
wtxObjModuleInfoAndPathGet - return information about an object module
wtxObjModuleFind - find an object module given a name or an ID
wtxObjModuleUnload - unload an object module
wtxMemChecksum - compute the checksum on target memory
wtxMemScan - scan target memory for the presence or absence of a pattern
wtxMemSet - set a block of memory to a specified value
wtxMemAlloc - allocate memory from the agent pool
wtxMemRealloc - reallocate a block of agent pool memory
wtxMemAlign - allocate a block of aligned memory from the agent pool
wtxMemAddToPool - add memory to the agent pool
wtxMemFree - free a block of agent pool memory
wtxMemWrite - write a memory block to the target
wtxMemWidthWrite - write a memory block to the target
wtxMemRead - read target memory into a memory block
wtxMemWidthRead - read memory from the target
wtxMemMove - move a block of memory on the target
wtxRegsGet - read a block of register data from the target
wtxRegsSet - write a block of register data to the target
wtxEventpointAdd - add an agent eventpoint
wtxEventpointList - list the eventpoints known to the agent
wtxEventpointListGet - list the eventpoints known to the agent
wtxEventpointDelete - delete an eventpoint
wtxOpen - open a file for use with virtual I/O
wtxClose - close a target server file
wtxVioCtl - change the characteristics of a virtual I/O channel
wtxVioWrite - virtual I/O write
wtxVioFileList - list the files managed by the target server
wtxConsoleCreate - create a target server console window (UNIX only)
wtxConsoleKill - kill a target server virtual I/O console (UNIX only)
wtxTsInfoGet - get information about the target server
wtxTsVersionGet - return Tornado version
wtxTsLock - lock the target server
wtxTsUnlock - unlock target server
wtxMemInfoGet - return information about the agent pool
wtxTargetAttach - attempt to reattach to the target
wtxTargetReset - reset the target
wtxAgentModeGet - get the WDB agent mode
wtxDirectCall - make a function call in the agent's context
wtxAgentModeSet - set the WDB agent mode
wtxFuncCall - call a function on the target
wtxEventGet - receive an event if any are waiting
wtxEventAdd - send an event to all other tools attached to the target server
wtxRegisterForEvent - provide a regular expression to mask event delivery
wtxGopherEval - request the evaluation of a Gopher script by the agent
wtxTsKill - kill the target server
wtxVioChanGet - claim a VIO channel
wtxVioChanRelease - release a VIO channel
wtxToolIdGet - return the tool identifier of the current tool
wtxCacheTextUpdate - synchronize the instruction and data caches.
wtxEventListGet - get all the events in one call.
wtxObjModuleChecksum - checks validity of target memory.
wtxUnregisterForEvent - ask the target server to not send events matching
wtxExecutableFind - WDB / WTX requests executable path via document name

DESCRIPTION

wtxtcl APIs libary (part I)

SEE ALSO

wtxtcl Library Part I


WTX Tcl Library : Tcl Procedures

wtxContextCreate

NAME

wtxContextCreate - create a new context on the target

LOCALE

WTX Tcl

SYNOPSIS

wtxContextCreate CONTEXT_TYPE name priority options stackBase stackSize entry redirIn redirOut 

DESCRIPTION

This command creates a new task context on the target. The CONTEXT_TYPE argument typically has the value CONTEXT_TASK. The newly created context has the given name, priority, and options, where name is a string, and priority and options are numbers interpreted by the agent. The parameter stackBase is ignored; the agent allocates a stack for the task. The allocated stack contains stackSize bytes. The new task context begins execution at the address entry and may have up to 10 integer arguments specified, a0...a9.

RETURNS

The context ID of the newly created context.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_CREATE, wtxtcl, wtxContextResume, wtxContextKill


WTX Tcl Library : Tcl Procedures

wtxContextKill

NAME

wtxContextKill - kill a context

LOCALE

WTX Tcl

SYNOPSIS

wtxContextKill [CONTEXT_TYPE] contextId

DESCRIPTION

This function kills the specified context. CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; CONTEXT_TASK is the default. ContextId is a context ID, perhaps one returned by wtxContextCreate.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_KILL, wtxtcl, wtxContextCreate


WTX Tcl Library : Tcl Procedures

wtxContextSuspend

NAME

wtxContextSuspend - suspend a context

LOCALE

WTX Tcl

SYNOPSIS

wtxContextSuspend [CONTEXT_TYPE] contextId

DESCRIPTION

This command suspends the specified context. CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; if absent, CONTEXT_TASK is assumed. ContextId is a context ID, perhaps one returned by wtxContextCreate.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_SUSPEND, wtxtcl, wtxContextCreate, wtxContextResume


WTX Tcl Library : Tcl Procedures

wtxContextStatusGet

NAME

wtxContextStatusGet - get the status of a context

LOCALE

WTX Tcl

SYNOPSIS

wtxContextStatusGet [CONTEXT_TYPE] contextId

DESCRIPTION

This command returns the status of the specified context as a string. CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; if it is omitted, CONTEXT_TASK is assumed. ContextId is a context ID, perhaps one returned by wtxContextCreate. You can use wtxEnumInfo with an argument of CONTEXT_STATUS to see the list of possible context status.

EXAMPLE

tcl> wtxContextStatusGet CONTEXT_SYSTEM 0
 CONTEXT_RUNNING
tcl> wtxEnumInfo CONTEXT_STATUS
 CONTEXT_RUNNING 0x0
 CONTEXT_SUSPENDED 0x1

NOTE

This request is implemented only for system mode context.

RETURNS

The context status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_STATUS_GET, wtxtcl, wtxContextCreate, wtxContextResume, wtxContextSuspend


WTX Tcl Library : Tcl Procedures

wtxContextCont

NAME

wtxContextCont - continue a context stopped at a breakpoint

LOCALE

WTX Tcl

SYNOPSIS

wtxContextCont [CONTEXT_TYPE] contextId

DESCRIPTION

This function continues the specified context. CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; if it is omitted, CONTEXT_TASK is assumed. ContextId is a context ID, perhaps one returned by wtxContextCreate.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_CONT, wtxtcl, wtxEventpointAdd, wtxContextCreate, wtxContextStep


WTX Tcl Library : Tcl Procedures

wtxContextResume

NAME

wtxContextResume - resume a suspended context

LOCALE

WTX Tcl

SYNOPSIS

wtxContextResume [CONTEXT_TYPE] contextId

DESCRIPTION

This command resumes the specified context. It restarts a task that has been suspended (perhaps by wtxContextSuspend). Do not use wtxContextResume to continue a task stopped at a breakpoint; the task simply hits the breakpoint again. Use wtxContextCont.

CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; if it is omitted, CONTEXT_TASK is assumed. ContextId is a context ID, perhaps one returned by wtxContextCreate.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_RESUME, wtxtcl, wtxContextSuspend, wtxContextCreate


WTX Tcl Library : Tcl Procedures

wtxContextStep

NAME

wtxContextStep - single step a context by machine instruction

LOCALE

WTX Tcl

SYNOPSIS

wtxContextStep [CONTEXT_TYPE] contextId [startAddr endAddr]

DESCRIPTION

This function runs the specified context in instruction-trace mode. If startAddr and endAddr are given, the context continues to single step instruction by instruction until the step range is exited (either by executing the last instruction in the range or by jumping out the range via a branch or call instruction). CONTEXT_TYPE is one of the names of the CONTEXT_TYPE enumeration in the WTX protocol, which may be specified numerically or in string form; if it is omitted, CONTEXT_TASK is assumed. ContextId is a context ID, perhaps one returned by wtxContextCreate.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CONTEXT_STEP, wtxtcl, wtxEventpointAdd, wtxContextCont, wtxContextCreate


WTX Tcl Library : Tcl Procedures

wtxSymFind

NAME

wtxSymFind - locate a symbol in the symbol table

LOCALE

WTX Tcl

SYNOPSIS

wtxSymFind [-exact] [-name name | -value value] [-type type]

DESCRIPTION

This function queries the target server symbol table looking for one symbol that exactly matches the specified name or value. If -type is specified, any returned symbol will have the supplied type. If -exact is specified, the name must match exactly. If not, wtxSymFind will consider a symbol to match if it differs from the supplied name only by having one leading underscore (that is, "_foo" could be returned for "foo", if -exact is not set). If a value is specified, the nearest symbol whose value is not greater than the given value is returned.

RETURNS

If a symbol matching the search criteria is found, the following structure is returned:

name address type {symTblId group module}
where name is the name of the found symbol, address its address, and type one of the VxWorks symbol type codes. symTblId is currently for internal use.

ERRORS

SYMTBL_SYMBOL_NOT_FOUND if no symbol is found.

CAVEATS

-exact should apply to value searches. symTblId, group, and module have NULL values for all searches.

SEE ALSO

wtxtcl Library Part I, WTX_SYM_FIND, wtxtcl, wtxSymAdd, wtxSymRemove, wtxSymListGet, wtxSymTblInfoGet


WTX Tcl Library : Tcl Procedures

wtxSymAdd

NAME

wtxSymAdd - add a new symbol to the symbol table

LOCALE

WTX Tcl

SYNOPSIS

wtxSymAdd name value type

DESCRIPTION

This function adds a new symbol to the target server symbol table, with the given name, value, and type. Name is a string, value is an integer, and type is a small integer representing one of the VxWorks symbol type codes.

ERRORS

NONE.

SEE ALSO

wtxtcl Library Part I, WTX_SYM_ADD, wtxtcl, wtxSymFind, wtxSymRemove, wtxSymListGet, wtxSymTblInfoGet


WTX Tcl Library : Tcl Procedures

wtxSymRemove

NAME

wtxSymRemove - remove a symbol from the symbol table

LOCALE

WTX Tcl

SYNOPSIS

wtxSymRemove name type

DESCRIPTION

This command removes the symbol with the given name and type from the target server symbol table.

ERRORS

SYMTBL_SYMBOL_NOT_FOUND if the symbol cannot be located.

SEE ALSO

wtxtcl Library Part I, WTX_SYM_REMOVE, wtxtcl, wtxSymFind, wtxSymAdd, wtxSymListGet, wtxSymTblInfoGet


WTX Tcl Library : Tcl Procedures

wtxSymTblInfoGet

NAME

wtxSymTblInfoGet - return information about the target server symbol table

LOCALE

WTX Tcl

SYNOPSIS

wtxSymTblInfoGet

DESCRIPTION

This function returns a list of information about the target server symbol table.

RETURNS

The returned list contains three elements: the first is the symbol table ID, the second is the number of symbols contained there, and the third is a boolean indicating whether the symbol table permits more than one entry to have the same name.

EXAMPLE

tcl> wtxSymTblInfoGet
0xa3558 2204 1

ERRORS

None.

SEE ALSO

wtxtcl Library Part I, WTX_SYM_TBL_INFO_GET, wtxtcl, wtxSymFind, wtxSymAdd, wtxSymRemove, wtxSymListGet


WTX Tcl Library : Tcl Procedures

wtxObjModuleList

NAME

wtxObjModuleList - fetch a list of IDs of object modules loaded on the target

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleList

DESCRIPTION

This function fetches the list of IDs of object modules loaded on the target.

RETURNS

A list of object module IDs.

EXAMPLE

tcl> wtxObjModuleList
0x98860 0x4a5c48

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_LIST, wtxtcl, wtxObjModuleInfoGet, wtxObjModuleFind, wtxObjModuleLoad, wtxObjModuleUnload


WTX Tcl Library : Tcl Procedures

wtxObjModuleInfoGet

NAME

wtxObjModuleInfoGet - return information about an object module

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleInfoGet objModuleId

DESCRIPTION

This routine returns a list of information about the module specified by objModuleId.

RETURNS

A list with five initial elements: the ID, name, format code, group, and load flags of the module. This is followed by a three-element list for each section in the module: the section flags, the address, and the length of the section.

CAVEATS

Section entries are unnamed.

EXAMPLE

This script prints a table of all loaded object module IDs and their names.

tcl> foreach mod [wtxObjModuleList] {
tcl>   puts stdout [lrange [wtxObjModuleInfoGet $mod] 0 1]
tcl> }
0x98860 vxWorks
0x4a5c48 tc68k.o

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_INFO_GET, wtxtcl, wtxObjModuleList, wtxObjModuleFind, wtxObjModuleLoad, wtxObjModuleUnload


WTX Tcl Library : Tcl Procedures

wtxObjModuleInfoAndPathGet

NAME

wtxObjModuleInfoAndPathGet - return information about an object module

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleInfoAndPathGet objModuleId

DESCRIPTION

This routine returns a list of information about the module specified by objModuleId.

RETURNS

A list with five initial elements: the ID, path and name, format code, group, and load flags of the module. This is followed by a three-element list for each section in the module: the section flags, the address, and the length of the section.

CAVEATS

Section entries are unnamed.

EXAMPLE

This script prints a table of all loaded object module IDs and their names.

tcl> foreach mod [wtxObjModuleList] {
tcl>   puts stdout [lrange [wtxObjModuleInfoAndPathGet $mod] 0 1]
tcl> }
0xcea38 /view/wrs.tor2_0.tempest-a/vobs/wpwr/target/config/mv1604vxWorks
0xe6f20 /view/pas.t2.ref/vobs/wpwr/target/lib/objPPC604gnutest/bcopyTest.o

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_INFO_GET, wtxtcl, wtxObjModuleInfoGet, wtxObjModuleList, wtxObjModuleFind, wtxObjModuleLoad, wtxObjModuleUnload


WTX Tcl Library : Tcl Procedures

wtxObjModuleFind

NAME

wtxObjModuleFind - find an object module given a name or an ID

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleFind nameOrId

DESCRIPTION

This function finds the name or ID of an object module given the other piece of information.

RETURNS

A list of two elements: the module ID and the module name for the module matching the nameOrId argument if one is found. This function is useful for converting between module names and IDs.

EXAMPLE

tcl> wtxObjModuleFind tc68k.o
0x4a5c48 tc68k.o

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_FIND, wtxtcl, wtxObjModuleList, wtxObjModuleInfoGet, wtxObjModuleLoad, wtxObjModuleUnload


WTX Tcl Library : Tcl Procedures

wtxObjModuleUnload

NAME

wtxObjModuleUnload - unload an object module

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleUnload nameOrId

DESCRIPTION

This command removes the given object module from the target, reclaiming agent pool memory.

EXAMPLE

Unload a module given its ID and another one given its name:

tcl> wtxObjModuleUnload 0xfb3008
0
tcl> wtxObjModuleUnload big.o
0

RETURNS

WTX Status.

ERRORS

NONE.

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_UNLOAD_2, wtxtcl, wtxObjModuleList, wtxObjModuleInfoGet, wtxObjModuleLoad, wtxObjModuleFind


WTX Tcl Library : Tcl Procedures

wtxMemChecksum

NAME

wtxMemChecksum - compute the checksum on target memory

LOCALE

WTX Tcl

SYNOPSIS

wtxMemChecksum startAddr nBytes

DESCRIPTION

This function computes and returns the checksum of the block of memory that starts at startAddr and extends nBytes.

RETURNS

The block checksum in hexadecimal.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_CHECKSUM, wtxtcl, wtxMemWrite, wtxMemRead


WTX Tcl Library : Tcl Procedures

wtxMemScan

NAME

wtxMemScan - scan target memory for the presence or absence of a pattern

LOCALE

WTX Tcl

SYNOPSIS

wtxMemScan [-notmatch] startAddr endAddr {-string string | -memblk mblk}

DESCRIPTION

This routine scans the target memory from startAddr to endAddr. When -notmatch is specified, it returns the first address not matching the pattern. Otherwise it returns the first address matching the pattern. The pattern can be specified to be either a string or a block of memory.

RETURNS

The first address matching string or mblk unless -notmatch is specified. When -notmatch is specified, it returns the first address not matching string or mblk.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_SCAN, wtxtcl, wtxMemWrite, wtxMemRead, wtxMemChecksum


WTX Tcl Library : Tcl Procedures

wtxMemSet

NAME

wtxMemSet - set a block of memory to a specified value

LOCALE

WTX Tcl

SYNOPSIS

wtxMemSet startAddr nBytes value

DESCRIPTION

This function fills a block of memory beginning at startAddr and extending nBytes with a 4-byte value.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_SET, wtxtcl, wtxMemWrite, wtxMemRead, wtxMemChecksum


WTX Tcl Library : Tcl Procedures

wtxMemAlloc

NAME

wtxMemAlloc - allocate memory from the agent pool

LOCALE

WTX Tcl

SYNOPSIS

wtxMemAlloc nBytes

DESCRIPTION

A memory block of nBytes is allocated from the target pool. To allocate memory from the target run-time, you call its memory manager with wtxFuncCall. Memory obtained from wtxMemAlloc can be freed with wtxMemFree.

RETURNS

The address of the newly allocated block.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_ALLOC, wtxtcl, wtxMemFree, wtxMemAlign, wtxMemAddToPool


WTX Tcl Library : Tcl Procedures

wtxMemRealloc

NAME

wtxMemRealloc - reallocate a block of agent pool memory

LOCALE

WTX Tcl

SYNOPSIS

wtxMemRealloc address size

DESCRIPTION

This command resizes a block of memory obtained from the wtxMemAlloc service to the new size. Address is the value returned by wtxMemAlloc.

RETURNS

The address of the new block of memory, which may have moved.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_REALLOC, wtxtcl, wtxMemAlloc, wtxMemFree


WTX Tcl Library : Tcl Procedures

wtxMemAlign

NAME

wtxMemAlign - allocate a block of aligned memory from the agent pool

LOCALE

WTX Tcl

SYNOPSIS

wtxMemAlign alignment size

DESCRIPTION

A block of memory is obtained which is aligned on an alignment-byte boundary. This function is similar to wtxMemAlloc with the addition of alignment.

RETURNS

The address of the allocated block.

wtxMemFree, wtxMemAlloc

SEE ALSO

wtxtcl Library Part I, WTX_MEM_ALIGN, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxMemAddToPool

NAME

wtxMemAddToPool - add memory to the agent pool

LOCALE

WTX Tcl

SYNOPSIS

wtxMemAddToPool address size

DESCRIPTION

This function adds the block of memory starting at address and spanning size bytes to the agent pool, enlarging it. It is possible to enlarge the agent's pool with memory obtained from the run-time memory manager or with any currently unclaimed memory.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_ADD_TO_POOL, wtxtcl, wtxMemAlloc, wtxMemFree


WTX Tcl Library : Tcl Procedures

wtxMemFree

NAME

wtxMemFree - free a block of agent pool memory

LOCALE

WTX Tcl

SYNOPSIS

wtxMemFree address

DESCRIPTION

This command frees a block of memory obtained by a call to wtxMemAlloc, wtxMemRealloc or wtxMemAlign, returning it to the agent pool.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_FREE, wtxtcl, wtxMemAlloc, wtxMemAlign


WTX Tcl Library : Tcl Procedures

wtxMemWrite

NAME

wtxMemWrite - write a memory block to the target

LOCALE

WTX Tcl

SYNOPSIS

wtxMemWrite blockId address [offset] [nBytes]

DESCRIPTION

This command writes the memory block named by blockId to the target memory starting at address. If offset is given, writing starts at that offset in the memory block. If nBytes is absent, the entire memory block (starting at offset if supplied) is written; otherwise nBytes of data are written to target memory.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_WRITE, wtxtcl, wtxMemRead, memBlockCreate


WTX Tcl Library : Tcl Procedures

wtxMemWidthWrite

NAME

wtxMemWidthWrite - write a memory block to the target

LOCALE

WTX Tcl

SYNOPSIS

wtxMemWidthWrite blockId address [width] [offset] [nBytes]

DESCRIPTION

This command writes the memory block named by blockId to the target memory starting at address. If offset is given, writing starts at that offset in the memory block. If nBytes is absent, the entire memory block (starting at offset if supplied) is written; otherwise nBytes of data are written to target memory. If width is given, it must be set to 1 (byte), 2 (word) or 4 (long word), by default, width is set to 4.

CAVEAT

Because this request is not implemented on WDB side, wtxMemWidthWrite uses WDB_MEM_WRITE and the width parameter is simply ignored.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_WIDTH_WRITE, wtxtcl, wtxMemWidthRead, memBlockCreate


WTX Tcl Library : Tcl Procedures

wtxMemRead

NAME

wtxMemRead - read target memory into a memory block

LOCALE

WTX Tcl

SYNOPSIS

wtxMemRead address nBytes

DESCRIPTION

The block of target memory starting at address and spanning nBytes is read into a memory block. The handle of the memory block is returned.

RETURNS

A memory block handle.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_READ, wtxtcl, wtxMemWrite, memBlockCreate, memBlockGet


WTX Tcl Library : Tcl Procedures

wtxMemWidthRead

NAME

wtxMemWidthRead - read memory from the target

LOCALE

WTX Tcl

SYNOPSIS

wtxMemWidthRead address nBytes [width]

DESCRIPTION

The block of target memory starting at address and spanning nBytes is read on width bytes large into a memory block. The handle of the memory block is returned. width can be set to 1 (byte), 2 (word) or 4 (long word), by default width is set to 4.

CAVEAT

Because this request is not implemented on WDB side, wtxMemWidthRead uses WDB_MEM_READ and the width parameter is simply ignored.

RETURNS

A memory block handle.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_WIDTH_READ, wtxtcl, wtxMemWidthWrite, memBlockCreate, memBlockGet


WTX Tcl Library : Tcl Procedures

wtxMemMove

NAME

wtxMemMove - move a block of memory on the target

LOCALE

WTX Tcl

SYNOPSIS

wtxMemMove source destination nBytes

DESCRIPTION

The block of memory starting at source and spanning nBytes is moved to destination. Note that the source and destination buffers may overlap.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_MEM_MOVE, wtxtcl, wtxMemRead, wtxMemWrite


WTX Tcl Library : Tcl Procedures

wtxRegsGet

NAME

wtxRegsGet - read a block of register data from the target

LOCALE

WTX Tcl

SYNOPSIS

wtxRegsGet CONTEXT_TYPE contextId REG_SET_TYPE offset nBytes

DESCRIPTION

This command reads a section of raw (target format) register data for the given context. CONTEXT_TYPE is one of the values given in the entry for WTX in the API Reference Manual: WTX Protocol . (Use wtxEnumInfo with an argument of CONTEXT_TYPE for information on possible types). Typically the type is CONTEXT_TASK. ContextId is the ID of the task whose register block is to be read. REG_SET_TYPE is the type of register block to read (usually REG_SET_IU or REG_SET_FPU; use wtxEnumInfo with an argument of REG_SET_TYPE for information on other possible types). Offset and nBytes delimit the section of the register block to read. The layout of the register blocks is dependent on the target kernel; for VxWorks, these are the same as the REG_SET layout in the task control block.

RETURNS

A memory-block handle with the uploaded register data. See memBlockCreate for information about memory block handles.

SEE ALSO

wtxtcl Library Part I, WTX_REGS_GET, wtxtcl, wtxRegsSet, memBlockCreate


WTX Tcl Library : Tcl Procedures

wtxRegsSet

NAME

wtxRegsSet - write a block of register data to the target

LOCALE

WTX Tcl

SYNOPSIS

wtxRegsSet CONTEXT_TYPE contextId REG_SET_TYPE offset nBytes blockId

DESCRIPTION

This command writes a section of raw (target format) register data for the given context. CONTEXT_TYPE is one of the values given in the entry for WTX in the API Reference Manual: WTX Protocol . (Use wtxEnumInfo with an argument of CONTEXT_TYPE for information on possible types). Typically the type is CONTEXT_TASK. ContextId is the ID of the task whose register block is to be written. REG_SET_TYPE is the type of register block to write (usually REG_SET_IU or REG_SET_FPU; use wtxEnumInfo with an argument of REG_SET_TYPE for information on other possible types). Offset and nBytes delimit the section of the register block to write. The layout of the register blocks is dependent on the target kernel; for VxWorks, these are the same as the REG_SET layout in the task control block. The register block receives data from the memory block blockId.

ERRORS

block not found
The block ID does not exist.

block too small to write that many registers
The block is too small for the requested data.

SEE ALSO

wtxtcl Library Part I, * WTX_REGS_SET, wtxtcl, wtxRegsSet, memBlockCreate


WTX Tcl Library : Tcl Procedures

wtxEventpointAdd

NAME

wtxEventpointAdd - add an agent eventpoint

LOCALE

WTX Tcl

SYNOPSIS

wtxEventpointAdd EVENT_TYPE eventArg0 [...eventArgN] CONTEXT_TYPE contextId ACTION_TYPE actionArg callRtn callArg

DESCRIPTION

This function adds an agent eventpoint. DETECTION_TYPE, EVENT_TYPE, CONTEXT_TYPE, and ACTION_TYPE are all WTX constants described in the WTX Protocol reference. Use wtxEnumInfo with one of the constants to find out what values you can supply in Tcl. For example:

wtxtcl.ex>wtxEnumInfo CONTEXT_TYPE
CONTEXT_SYSTEM 0x1
CONTEXT_GROUP 0x2
CONTEXT_ANY 0x3
CONTEXT_TASK 0x4
CONTEXT_ANY_TASK 0x5
CONTEXT_ISR 0x6
CONTEXT_ISR_ANY 0x7
For a complete discussion of events and using wtxtcl to work with them, see the API Programmer's Guide: The WTX Protocol .

When CONTEXT_TYPE is set to WTX_CONTEXT_SYSTEM, then only eventpoints in system mode can be added. When CONTEXT_TYPE is set to WTX_CONTEXT_TASK, then only eventpoints in context task can be added.

RETURNS

The eventpoint number, which can be used as a key to wtxEventpointDelete.

SEE ALSO

wtxtcl Library Part I, WTX_EVENTPOINT_ADD_2, wtxtcl, wtxEventpointDelete, wtxEventpointList, WTX entry in the API Reference Manual: WTX Protocol , API Programmer's Guide: The WTX Protocol


WTX Tcl Library : Tcl Procedures

wtxEventpointList

NAME

wtxEventpointList - list the eventpoints known to the agent

LOCALE

WTX Tcl

SYNOPSIS

wtxEventpointList 

DESCRIPTION

This command returns a list of all eventpoints installed in the agent.

RETURNS

Each item in the returned list has four elements, one for each of the arguments to the wtxEventpointAdd command: DETECTION_TYPE, EVENT_TYPE, CONTEXT_TYPE, and ACTION_TYPE. Each of these lists in turn has two elements, the WTX type and the additional argument.

CAVEATS

The returned events are not keyed to eventpoint number.

SEE ALSO

wtxtcl Library Part I, WTX_EVENTPOINT_LIST, wtxtcl, wtxEventpointAdd, wtxEventpointDelete


WTX Tcl Library : Tcl Procedures

wtxEventpointListGet

NAME

wtxEventpointListGet - list the eventpoints known to the agent

LOCALE

WTX Tcl

SYNOPSIS

wtxEventpointListGet

DESCRIPTION

This command returns an eventpoints info list installed in the agent.

RETURNS

Each item in the returned list has five elements: three elements, one for each of the arguments to the wtxEventpointAdd command: EVENT_TYPE, CONTEXT_TYPE, and ACTION_TYPE; and two more elements for the tool identifier and the eventpoint identifier.

CONTEXT_TYPE and ACTION_TYPE lists in has two elements, the WTX type and the additional argument. EVENT_TYPE lists in may have more than two elements, the WTX type and the additional arguments.

SEE ALSO

wtxtcl Library Part I, WTX_EVENTPOINT_LIST_GET, wtxtcl, wtxEventpointAdd, wtxEventpointDelete


WTX Tcl Library : Tcl Procedures

wtxEventpointDelete

NAME

wtxEventpointDelete - delete an eventpoint

LOCALE

WTX Tcl

SYNOPSIS

wtxEventpointDelete epNum

DESCRIPTION

This function removes the eventpoint numbered epNum from the agent.

SEE ALSO

wtxtcl Library Part I, WTX_EVENTPOINT_DELETE, wtxtcl, wtxEventpointAdd, wtxEventpointList


WTX Tcl Library : Tcl Procedures

wtxOpen

NAME

wtxOpen - open a file for use with virtual I/O

LOCALE

WTX Tcl

SYNOPSIS

wtxOpen [-channel chan] filename flags mode

DESCRIPTION

This command causes the target server to open a file with the given filename, flags, and mode. The flags parameter can be WTX_O_RDONLY or WTX_O_WRONLY or'ed with WTX_O_CREAT. flags can also be an integer as defined in sys/fcntl.h but this is only for backward compatibility and should not be used.

If -channel is specified, virtual I/O on the given channel is redirected to the file.

EXAMPLE

On UNIX, to create and open the file /tmp/myFile in read-only mode with permissions set to "-r--------" use:

wtxOpen /tmp/myFile WTX_O_CREAT|WTX_O_RDONLY 0400

RETURNS

An integer file descriptor, which can be used with other VIO commands.

CAVEATS

The flags and mode parameters are host-dependent.

SEE ALSO

wtxtcl Library Part I, WTX_OPEN, wtxtcl, wtxClose, wtxVioCtl


WTX Tcl Library : Tcl Procedures

wtxClose

NAME

wtxClose - close a target server file

LOCALE

WTX Tcl

SYNOPSIS

wtxClose fd

DESCRIPTION

The file descriptor fd, which was obtained by a call to wtxOpen, is closed.

SEE ALSO

wtxtcl Library Part I, WTX_CLOSE, wtxtcl, wtxOpen, wtxVioCtl


WTX Tcl Library : Tcl Procedures

wtxVioCtl

NAME

wtxVioCtl - change the characteristics of a virtual I/O channel

LOCALE

WTX Tcl

SYNOPSIS

wtxVioCtl channel VIO_CTL_REQUEST arg

DESCRIPTION

This function issues a virtual I/O control request for the given channel. The only VIO control request supported is WTX_CTL_VIO_REDIRECT, which redirects output to the given file descriptor arg.

SEE ALSO

wtxtcl Library Part I, WTX_VIO_CTL, wtxtcl, wtxOpen, wtxVioWrite


WTX Tcl Library : Tcl Procedures

wtxVioWrite

NAME

wtxVioWrite - virtual I/O write

LOCALE

WTX Tcl

SYNOPSIS

wtxVioWrite channel [-string string | -memblk blockId]

DESCRIPTION

This command writes data to a virtual I/O channel. The data can come from a supplied string or a memory block can be written to the VIO channel.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_VIO_WRITE, wtxtcl, wtxOpen


WTX Tcl Library : Tcl Procedures

wtxVioFileList

NAME

wtxVioFileList - list the files managed by the target server

LOCALE

WTX Tcl

SYNOPSIS

wtxVioFileList

DESCRIPTION

A list of 7 elements is returned for each file managed by the target server. The elements are:

filename              
file descriptor       (as obtained by wtxOpen)
VIO channel           (-1 indicates that there is no redirection)
file pointer          (for internal use)
file type             (0 for files/sockets; 1 for pipes)
mode                  (as supplied to wtxOpen)
status                (1 = open, 0 = closed)
process id            (for VIO consoles)

SEE ALSO

wtxtcl Library Part I, WTX_VIO_FILE_LIST, wtxtcl, wtxOpen


WTX Tcl Library : Tcl Procedures

wtxConsoleCreate

NAME

wtxConsoleCreate - create a target server console window (UNIX only)

LOCALE

WTX Tcl

SYNOPSIS

wtxConsoleCreate name [display]

UNIX HOSTS

This command creates an xterm console with the given name on the default X display (as known to the target server) or the given display if that is supplied. The name passed appears in the window manager title bar. The number of buffered lines (default 88) can be changed by setting the environment variable WTX_CONSOLE_LINES to the number of desired buffered lines. Set this variable before launching the target server.

WINDOWS HOSTS

This request is not implemented on Windows. Windows allows only one virtual console and it must be started on the target server command line with the -c option.

RETURNS

For UNIX hosts, a Tcl list of the form:

{consoleName consoleDisplay consolePid fdIn fdOut}

SEE ALSO

wtxtcl Library Part I, WTX_CONSOLE_CREATE, wtxtcl, wtxOpen, wtxVioCtl


WTX Tcl Library : Tcl Procedures

wtxConsoleKill

NAME

wtxConsoleKill - kill a target server virtual I/O console (UNIX only)

LOCALE

WTX Tcl

SYNOPSIS

wtxConsoleKill pid

UNIX HOSTS

This function kills the xterm VIO console whose process ID is pid.

WINDOWS HOSTS

This request is not implemented on Windows. If issued, it returns an error, but does not attempt to kill an existing console.

SEE ALSO

wtxtcl Library Part I, WTX_CONSOLE_KILL, wtxtcl, wtxConsoleCreate


WTX Tcl Library : Tcl Procedures

wtxTsInfoGet

NAME

wtxTsInfoGet - get information about the target server

LOCALE

WTX Tcl

SYNOPSIS

wtxTsInfoGet

DESCRIPTION

This function returns a structure containing information about the target server.

RETURNS

A nested list of data. The structure of the list is given below. For a description of the fields and their values, see WTX_TS_INFO_GET.

   0     tgtLinkDesc.name
   1     
    1.0  tgtLinkDesc.type
    1.2  tgtLinkDesc.speed
   2     
    2.0  tgtInfo.rtInfo.cpuType
    2.1  tgtInfo.rtInfo.hasFpp
    2.2  tgtInfo.rtInfo.hasWriteProtect
    2.3  tgtInfo.rtInfo.pageSize
    2.4  tgtInfo.rtInfo.endian
   3
    3.0  tgtInfo.rtInfo.rtType
    3.1  tgtInfo.rtInfo.rtVersion
   4     tgtInfo.rtInfo.bspName
   5     tgtInfo.rtInfo.bootline
   6     
    6.0  tgtInfo.rtInfo.memBase
    6.1  tgtInfo.rtInfo.memSize
   7    
    7.0  tgtInfo.rtInfo.hostPoolBase
    7.1  tgtInfo.rtInfo.hostPoolSize
   8     userName
   9     startTime
  10     accessTime
  11     lockMsg
  12     pReserved
  13     Target Server version
  14     Agent version 
  15 
    15.0 pTool->toolId
    15.1 pTool->toolName
    15.2 pTool->toolArgv
    15.3 pTool->toolVersion
    15.4 pTool->userName

SEE ALSO

wtxtcl Library Part I, WTX_TS_INFO_GET, wtxtcl, wtxToolAttach


WTX Tcl Library : Tcl Procedures

wtxTsVersionGet

NAME

wtxTsVersionGet - return Tornado version

LOCALE

WTX Tcl

SYNOPSIS

wtxTsVersionGet

DESCRIPTION

This function gets a string representing the Tornado version.

SEE ALSO

wtxtcl Library Part I, wtxtcl, wtxTsInfoGet


WTX Tcl Library : Tcl Procedures

wtxTsLock

NAME

wtxTsLock - lock the target server

LOCALE

WTX Tcl

SYNOPSIS

wtxTsLock [seconds]

DESCRIPTION

The target server is locked to the invoking user's user ID. Other users attempting to communicate with the target server will be rejected. If seconds is used, then the target server will be locked only for seconds seconds, otherwise, it will be locked indefinitely.

SEE ALSO

wtxtcl Library Part I, WTX_TS_LOCK, wtxtcl, wtxTsUnlock


WTX Tcl Library : Tcl Procedures

wtxTsUnlock

NAME

wtxTsUnlock - unlock target server

LOCALE

WTX Tcl

SYNOPSIS

wtxTsUnlock

DESCRIPTION

The target server is unlocked. After this, other users may attach tools to the target server.

SEE ALSO

wtxtcl Library Part I, WTX_TS_UNLOCK, wtxtcl, wtxTsLock


WTX Tcl Library : Tcl Procedures

wtxMemInfoGet

NAME

wtxMemInfoGet - return information about the agent pool

LOCALE

WTX Tcl

SYNOPSIS

wtxMemInfoGet

DESCRIPTION

This routine returns a vector of information about the agent pool.

RETURNS

A list of 11 integers:

current bytes free
current bytes allocated
cumulative bytes allocated
current blocks free
current blocks allocated
cumulative blocks allocated
average free block size
average allocated block size
cumulative average allocated block size
biggest block size
(reserved)

SEE ALSO

wtxtcl Library Part I, WTX_MEM_INFO_GET, wtxtcl, wtxMemAlloc, wtxMemAddToPool


WTX Tcl Library : Tcl Procedures

wtxTargetAttach

NAME

wtxTargetAttach - attempt to reattach to the target

LOCALE

WTX Tcl

SYNOPSIS

wtxTargetAttach

DESCRIPTION

This routine attempts to reattach to a target that has been disconnected or to which the target server is waiting to connect.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_TARGET_ATTACH, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxTargetReset

NAME

wtxTargetReset - reset the target

LOCALE

WTX Tcl

SYNOPSIS

wtxTargetReset

DESCRIPTION

The target is reset as if it had been manually rebooted.

CAVEATS

This command does not perform a wtxToolDetach nor does it attempt to reestablish communication when the agent comes back up.

SEE ALSO

wtxtcl Library Part I, WTX_TARGET_RESET, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxAgentModeGet

NAME

wtxAgentModeGet - get the WDB agent mode

LOCALE

WTX Tcl

SYNOPSIS

wtxAgentModeGet

DESCRIPTION

The current agent mode is returned as a string. You can use wtxEnumInfo with an argument of AGENT_MODE to see the list of possible values.

EXAMPLE

tcl> wtxtcl.ex>wtxAgentModeGet
 AGENT_MODE_TASK

tcl> wtxEnumInfo AGENT_MODE
 AGENT_MODE_TASK 0x1
 AGENT_MODE_EXTERN 0x2

SEE ALSO

wtxtcl Library Part I, WTX_AGENT_MODE_GET, wtxtcl, wtxAgentModeSet


WTX Tcl Library : Tcl Procedures

wtxDirectCall

NAME

wtxDirectCall - make a function call in the agent's context

LOCALE

WTX Tcl

SYNOPSIS

wtxDirectCall entry [arg0...arg9]

DESCRIPTION

The WDB agent makes a direct function call to the address specified by entry. Up to ten integer arguments may be given, and the integer return value of the function is returned. No task context is created to contain the function call. For that reason, this function should only be used in special circumstances, as it can interfere with the agent's operation.

SEE ALSO

wtxtcl Library Part I, WTX_DIRECT_CALL, wtxtcl, wtxFuncCall


WTX Tcl Library : Tcl Procedures

wtxAgentModeSet

NAME

wtxAgentModeSet - set the WDB agent mode

LOCALE

WTX Tcl

SYNOPSIS

wtxAgentModeSet AGENT_MODE

DESCRIPTION

The WDB agent is placed into the specified AGENT_MODE. To see the values this parameter can take, you can use wtxEnumInfo with an argument of AGENT_MODE.

SEE ALSO

wtxtcl Library Part I, WTX_AGENT_MODE_SET, wtxtcl, wtxAgentModeGet


WTX Tcl Library : Tcl Procedures

wtxFuncCall

NAME

wtxFuncCall - call a function on the target

LOCALE

WTX Tcl

SYNOPSIS

wtxFuncCall [-int | -float | -double] [-pri n] [-opt opt] [-rIn fdIn] [-rOut fdOut] addr [a0...a9]

DESCRIPTION

This routine calls the function at addr with up to 10 integer arguments a0...a9. The return type is specified with the -int, -float, or -double flag. The function is called in the context of a task spawned for that purpose. The arguments -pri and -opt can be used to control the priority and option words of that task. The arguments -rIn and -rOut can be used to specify file descriptors for input and output redirection. The called function will use this new assignement when doing I/O, instead of the system-wide global assignement which is used by default.

RETURNS

The ID of the function call. When the called function terminates, a CALL_RETURN event is generated which references this ID and contains the return value.

SEE ALSO

wtxtcl Library Part I, WTX_FUNC_CALL, wtxtcl, wtxEventGet, wtxContextCreate


WTX Tcl Library : Tcl Procedures

wtxEventGet

NAME

wtxEventGet - receive an event if any are waiting

LOCALE

WTX Tcl

SYNOPSIS

wtxEventGet

DESCRIPTION

If there is at least one event in the tool's target server event queue, the first event is dequeued and returned by this command. For a description of the various events, see the entry for WTX in the API Reference Manual: WTX Protocol .

RETURNS

An event in string form. The first element of the list is the event name, followed by the integer parameters of the event. If the event has an attached data block, this is returned as a memory block handle in the last position of the list. If there are no events, an empty string is returned.

EVENT FORMATS

For Tcl, events are returned in Tcl list format. The first element of the list is the type of event, and several integer arguments may follow. If an event has an associated data buffer (see WTX), this is returned in the form of a memory block handle (see memBlockCreate).

This is a table of some target server event formats:

TEXT_ACCESS   contextId contextType pc fp sp
EXCEPTION     contextType contextId excVector pESF
VIO_WRITE     channel mblk
CALL_RETURN   callId value errno
Consult the WTX reference entry for more information about events and the interpretation of their parameters.

SEE ALSO

wtxtcl Library Part I, WTX_EVENT_GET, wtxtcl, wtxRegisterForEvent, WTX entry in the API Reference Manual: WTX Protocol


WTX Tcl Library : Tcl Procedures

wtxEventAdd

NAME

wtxEventAdd - send an event to all other tools attached to the target server

LOCALE

WTX Tcl

SYNOPSIS

wtxEventAdd event

DESCRIPTION

The string event is sent to all tools (except the originating tool).

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_EVENT_ADD, wtxtcl, wtxEventGet, wtxRegisterForEvent


WTX Tcl Library : Tcl Procedures

wtxRegisterForEvent

NAME

wtxRegisterForEvent - provide a regular expression to mask event delivery

LOCALE

WTX Tcl

SYNOPSIS

wtxRegisterForEvent regex

DESCRIPTION

This request supplies a regular expression to the target server that is used to determine which events should be reported to the tool. (Initially, tools receive no events.) If another regular expression is supplied after this function is called, it supersedes the previous regular expression.

For a complete discussion of events, see the API Programmer's Guide: The WTX Protocol or the reference manual entry for WTX_REGISTER_FOR_EVENT.

EXAMPLE

To arrange to receive all events, execute:

wtxRegisterForEvent .*

SEE ALSO

wtxtcl Library Part I, WTX_REGISTER_FOR_EVENT, wtxtcl, wtxEventGet


WTX Tcl Library : Tcl Procedures

wtxGopherEval

NAME

wtxGopherEval - request the evaluation of a Gopher script by the agent

LOCALE

WTX Tcl

SYNOPSIS

wtxGopherEval script

DESCRIPTION

This request executes the Gopher script on the target and returns the vector of values generated by the script. For a detailed discussion of Gopher, see the WTX entry in the API Reference Manual: WTX Protocol , or the API Programmer's Guide: The WTX Protocol .

Gopher is a small, interpreted language that allows the traversal of simple data structures in target memory. The Gopher execution environment is an abstract machine that consists of two objects: the "pointer" and the "tape". The pointer is an address in the target's address space, and the tape is a one-way write-only area where Gopher results are accumulated. When the Gopher script terminates, the contents of the tape are returned to the tool.

RETURNS

A Tcl list consisting of a group of strings for each data structure member evaluated by the Gopher expression. Tcl automatically interprets the Gopher type codes and creates the list.

EXAMPLE

This example uses the Gopher script developed in the WTX_GOPHER_EVAL example with appropriate Tcl structures added. The data structures to be evaluated are as follows:

typedef struct _node
    {
    UINT32            number;         /* number of node */
    struct _node *    pNext;          /* single linked list */
    struct _other *   pOther;         /* pointer to an OTHER */
    char *            name;           /* name of node */
    UINT32            value;          /* value of node */
    } NODE;

typedef struct _other
    {
    UINT32            x1;             /* X Factor One */
    UINT32            x2;             /* X Factor Two */
    } OTHER;
Suppose we want a list of the numbers and names of each node in a list, and that the symbol nodeList contains a pointer to the first node. We would start by querying the symbol table for the value of nodeList:

set nodeList [lindex [wtxSymFind -name nodeList] 1]
The final Gopher string traverses the _node structure and then obtains the x1 and x2 values from pOther.

wtxGopherEval "$nodeList * { @ < +8 *$ > < +4 * {@@ 0} > * }"
The result of this example will consist of a list whose length depends on the number of elements of the struct _node:

{name1 value1 x11 x21 name2 value2 ... x1n x2n}

CAVEATS

Gopher cannot use symbolic information, so you must compute structure offsets and store only numbers to the Gopher string. (In this example, the strings we have given are executed in the context of wtxGopherEval, so that Tcl variables such as $nodeList are expanded before Gopher interpretation).

The size of the Gopher tape that can be returned is limited to the size of the agent's communication buffer.

SEE ALSO

wtxtcl Library Part I, WTX_GOPHER_EVAL, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxTsKill

NAME

wtxTsKill - kill the target server

LOCALE

WTX Tcl

SYNOPSIS

wtxTsKill OBJ_KILL_REQUEST arg

DESCRIPTION

This command kills the target server the tool is connected to. OBJ_KILL_REQUEST can be either WTX_OBJ_KILL_DESTROY, which simply destroys the target server, or WTX_OBJ_KILL_RESTART, which destroys it and attempts to restart it. Arg is an optional numeric argument; see WTX_OBJ_KILL in the API Reference Manual: WTX Protocol for more details.

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_KILL, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxVioChanGet

NAME

wtxVioChanGet - claim a VIO channel

LOCALE

WTX Tcl

SYNOPSIS

wtxVioChanGet

DESCRIPTION

This function selects a VIO channel number that is not currently being used by any other tool. The number returned is in the range 1..255 (channel 0 is reserved for system use). It is the responsibility of the tool to open the channel on the target; this function merely allows different tools to coordinate their selection of channel numbers.

When the channel is no longer needed, wtxVioChanRelease should be called.

RETURNS

A VIO channel number. If none are available, the error SVR_NO_VIO_CHANNEL is returned.

SEE ALSO

wtxtcl Library Part I, WTX_VIO_CHAN_GET, wtxtcl, wtxVioChanRelease


WTX Tcl Library : Tcl Procedures

wtxVioChanRelease

NAME

wtxVioChanRelease - release a VIO channel

LOCALE

WTX Tcl

SYNOPSIS

wtxVioChanRelease channel

DESCRIPTION

This function releases a channel obtained by wtxVioChanGet, making it available for other tools.

SEE ALSO

wtxtcl Library Part I, WTX_VIO_CHAN_RELEASE, wtxtcl, wtxVioChanGet


WTX Tcl Library : Tcl Procedures

wtxToolIdGet

NAME

wtxToolIdGet - return the tool identifier of the current tool

LOCALE

WTX Tcl

SYNOPSIS

wtxToolIdGet

DESCRIPTION

This function returns the tool identifier of the current tool.

RETURNS

The tool identifier of the current tool.

SEE ALSO

wtxtcl Library Part I, wtxtcl, wtxToolName


WTX Tcl Library : Tcl Procedures

wtxCacheTextUpdate

NAME

wtxCacheTextUpdate - synchronize the instruction and data caches.

LOCALE

WTX Tcl

SYNOPSIS

wtxCacheTextUpdate address nBytes

DESCRIPTION

This function flushes the data chache, then invalidates the instruction cache. This operation forces the instruction cache to fetch code that may have been created via the data path.

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_CACHE_TEXT_UPDATE, wtxtcl


WTX Tcl Library : Tcl Procedures

wtxEventListGet

NAME

wtxEventListGet - get all the events in one call.

LOCALE

WTX Tcl

SYNOPSIS

wtxEventListGet [nEvents]

DESCRIPTION

This function returns the tool's target server event queue in one call. If more than one event is found, a list is built and returned to the caller. If nEvents is the maximum number of events returned by this request.

EXAMPLE

Get all events from the target server

tcl> wtxEventListGet
{{TOOL_ATTACH windsh 0x4dbe30} {CALL_RETURN 0x382a78 0x6 0} 
{CALL_RETURN 0x382a78 0x7 0}}
Get only 1 event from the target server
tcl> wtxEventListGet 1
{TOOL_ATTACH windsh 0x4d8c80}

RETURNS

An element of the returned event list is made of an event string. The first element of the list is the event name, followed by the integer parameters of the event. If the event has an attached data block, this is returned as a memory block handle in the last position of the list. If there are no events, an empty list is returned.

SEE ALSO

wtxtcl Library Part I, WTX_EVENT_LIST_GET, wtxtcl, wtxEventGet, wtxEventAdd, wtxRegisterForEvent, wtxUnregisterForEvent


WTX Tcl Library : Tcl Procedures

wtxObjModuleChecksum

NAME

wtxObjModuleChecksum - checks validity of target memory.

LOCALE

WTX Tcl

SYNOPSIS

wtxObjModuleChecksum nameOrId

DESCRIPTION

This routine compares object module checksum on target with object module checksum on target server. This is a way to control the target memory integrity. If nameOrId is set to "WTX_ALL_MODULE_CHECK" otherwise only the selected module is checked.

NOTE

Because Elf modules may have more than one section of text, text sections are gathered in a text segment. But, if on the target memory (or in the module) sections are contiguous, they may not be contiguous in the host memory cache (due to different malloc calls for each sections). Then, checksums cannot be compared for the text segment but only for the first text section.

EXAMPLE

Check 1 module

tcl> wtxObjModuleChecksum signalTest.o
0
Check all the modules tcl> wtxObjModuleChecksum WTX_ALL_MODULE_CHECK

0

\ce

RETURNS

WTX Status.

SEE ALSO

wtxtcl Library Part I, WTX_OBJ_MODULE_CHECKSUM, wtxtcl, wtxObjModuleList, wtxMemChecksum


WTX Tcl Library : Tcl Procedures

wtxUnregisterForEvent

NAME

wtxUnregisterForEvent - ask the target server to not send events matching

a regexp

LOCALE

WTX Tcl

SYNOPSIS

wtxUnregisterForEvent regex

DESCRIPTION

This routine registers which events are unwanted. Usually, if we want to filter events notification we have to give the regular expression to wtxRegisterForEvent. A more simple way to do this is to be registered for all the events and to be registered for only those which are unwanted.

EXAMPLE

Register for all events and get the events when a windsh attached

tcl> wtxRegisterForEvent .*
0
tcl> wtxEventListGet
{{TOOL_ATTACH windsh 0x89e38} {CALL_RETURN 0x382a78 0x8 0}
{CALL_RETURN 0x382a78 0x9 0}}
Register for all events except TOOL_ATTACH and get the events when a windsh attached
tcl> wtxRegisterForEvent .*
0
tcl> wtxUnregisterForEvent TOOL_ATTACH
0
tcl> wtxEventListGet
{{CALL_RETURN 0x382a78 0xa 0} {CALL_RETURN 0x382a78 0xb 0}}

RETURNS

WTX Status

SEE ALSO

wtxtcl Library Part I, WTX_UNREGISTER_FOR_EVENT, wtxtcl, wtxRegisterForEvent, wtxEventGet, wtxEventListGet


WTX Tcl Library : Tcl Procedures

wtxExecutableFind

NAME

wtxExecutableFind - WDB / WTX requests executable path via document name

LOCALE

WTX Tcl

SYNOPSIS

wtxExecutableFind filename

DESCRIPTION

This function returns a pathname for the executable associated with open Windows shell acction on a given type of document. File with filename must exist and have a registered Windows extension (e.g. .html, .doc, .bmp etc) Function works on Win32 only and returns TCL_ERROR if called on Unix.

NOTE

Input filename can contain \ or / characters as directory seprators in pathname. When wtxExecutableFind returns, returned pathname has forward slashes "/" and may contain spaces. In recent versions of Win32 cannot be longer than 260 bytes and short-name equivavalent is returned. The result may contain the path to the DDE server or DLL.

RETURNS

Full blown Win32 pathname starting with drive letter or pathname in UNC form or [possibly] path to DDE server.

EXAMPLE

tcl> wtxExecutableFind c:/MyTestDocumentThatDoesExist.htm
C:\Program Files\Microsoft Internet\Iexplore.exe

ERRORS

no association
There is no association for the specified file type.

file not found
The specified file was not found.

path not found
The specified path was not found.

exe file is invalid
The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).

out of memory
System is low on or out of memory.

unknown error
System returned unexpected error.

not implemented
Not implemented for this platform.

SEE ALSO

wtxtcl Library Part I, * wtxtcl