This document is a single-page version of a a multi-page document, suitable for easy printing.

Swat Reference

The descriptions of the Swat commands will follow the following notational conventions:


_print

 _print <expression>

Examples:

"_print ax-10"
print ax less 10 decimal.

Print the value of an expression.

The difference between this command and the "print" command is a subtle one: if one of the arguments contains square-brackets, the Tcl interpreter will attempt to evaluate the text between the brackets as a command before _print is given the argument. If the text between the brackets is intended to be an array index, the interpreter will generate an error before the Swat expression evaluator has a chance to decide whether the text is a nested Tcl command or an array index.

For this reason, this function is intended primarily for use by Tcl procedures, not by users.

See Also: print, addr-parse.

abort

abort [<frame-number>]
abort [<function>]

Examples:

"abort"
abort executing the current frame.
"abort 3"
abort executing up through the third frame.
"abort ObjMessage"
abort executing up through first ObjMessage.

Abort code execution up through a given frame or routine. By "abort", we me "do not execute". This can be quite dangerous, as semaphores may not be ungrabbed, blocks not unlocked, flags not cleared, etc., leaving the state of objects, and if executing system code, possibly the system itself in a bad state. This command should only be used when the only alternative is to to detach (i.e. in a fatal error) as a way to possibly prolong the usefulness of the debugging session.

See Also: finish, backtrace.

abortframe

abortframe <frame-token>

Examples:

"abortframe $cur"
Abort all code execution through the frame whose token is in $cur.

Aborts code execution up through a particular stack frame. As no code is executed, the registers may be in a garbaged state.


addr-parse

addr-parse <addr> [<addr-only>]

Examples:

"addr-parse *ds:si"
Parse the address "*ds:si" into its handle, offset and data-type components. In this case, the data-type will be "nil".
"addr-parse ILLEGAL_HANDLE 0"
Figures the value for the enumerated constant "ILLEGAL_HANDLE". The handle for this non-address will be "value".

This command parses the address expression into its components, returning a list {<handle> <offset> <type> } as its value.

See Also: value, handle, type.

addr-preprocess

 addr-preprocess <addr> <seg-var> <off-var>

Examples:

"addr-preprocess $args s o"
Parse the address expression in $args, storing the segment portion in $s and the offset portion in $o in the current scope.

Preprocesses an address expression into a form that is easier to manipulate and faster to reparse.

See Also: addr-parse.

addr-with-obj-flag

addr-with-obj-flag

Examples:

"var addr [addr-with-obj-flag $addr]"
If $addr is "-i", returns the address of the current implied grab.

This is a utility routine that can be used by any command that deals with objects where the user may reasonably want to operate on the leaf object of one of the hierarchies, or the windowed object under the mouse. It can be given one of a set of flags that indicate where to find the address of the object on which to operate.

See Also: impliedgrab, content, focusobj, targetobj, modelobj, keyboardobj, mouseobj.


alias

alias [<name> [<body>]]

Examples:

"alias p print"
Execute "print" when the user types the command "p". Any arguments to "p" get passed to "print" in the order they were given.
"alias while {for {} $1 {} $2}"
Executes an appropriate "for" loop when the "while" command is executed with its two arguments: a test expression and a body of commands to execute.
"alias"
Prints all the defined aliases.
"alias while"
Prints what the "while" command is aliased to.

This is a short-cut to allow you to make commands you commonly type easier to use, and to define simple new commands quickly.

See Also: unalias.

alignFields

var alignFields [(0|1)]

Examples:

"var alignFields 1"
Sets the "print" command to align the values for all the fields of a given structure.

Determines whether structure-field values follow immediately after the field name or if all values are indented to the same level. The "print" command and other display commands use this variable when formatting their output.

See Also: print.

antifreeze

antifreeze <patient>
antifreeze :<n>
antifreeze <patient>:<n>
antifreeze <id>

Examples:

"antifreeze term"
Promotes the application thread for "term" to be the "most-runnable"
"antifreeze :1"
Does likewise for thread #1 of the current patient
"antifreeze 16c0h"
Does likewise the thread whose handle is 16c0h
"antifreeze"
Promotes the current thread to be the "most-runnable."

See Also: freeze.

antithaw

antithaw <patient>
antithaw :<n>
antithaw <patient>:<n>
antithaw <id>

Examples:

"antithaw term"
Allows the application thread for "term" to run normally.
"antithaw :1"
Allows thread #1 of the current patient to run normally.
"antithaw 16c0h"
Allow the thread whose handle is 16c0h to run normally.

See Also: thaw.

appobj

   appobj [<patient>]

Examples:

"pobj [appobj draw]"
prints the GenApplication object for draw.
"pobj [appobj]"
prints the GenApplication object for the current application (equivalent to "pobj -a").

Returns the address of the GenApplication object for the given patient, or the current one if you give no patient.

See Also: impliedgrab.

apropos

apropos [<string>]

Examples:

"apropos vis"
Find all commands related to vis
"apropos text"
Find all commands related to text

Search the list of commands and command help for all entries containing <string>. Lists each command and its synopsis.

<string> may actually be a pattern, as described in the help for the "string" command (under "string match"). It automatically has a leading and following * tacked onto it to cause it to match anywhere within a help string.

See Also: help.

aset

aset <array-name> <index> <value>

Examples:

"aset foo $i $n"
Sets the $i'th element (counting from zero) of the value stored in the variable foo to $n.

Allows you to treat a list stored in a variable as an array, setting arbitrary elements of that array to arbitrary values.

See Also: index.

assoc

assoc <list> <key>

Examples:

"assoc $classes GenPrimaryClass"
Examines the sublists of $classes and returns the first one whose first element is the string GenPrimaryClass.

Searches an associative list to find an element with a particular key. The list is itself made up of lists, each of whose first element is a key.

See Also: car, cdr, range, list, delassoc.


assign

assign <addr> <value>

Examples:

"assign ip ip+2"
Add 2 to the value of IP in the current frame.
"assign {word ds:si} 63h"
Store 63h in the word at ds:si

Performs an assignment to a patient variable or register (but not to an element of the value history). The first argument is the variable or register to be assigned and the second argument is the value to assign to it (which may be a regular address expression). If the first expression doesn't indicate a type, "word" is assumed. Only byte , word or dword types are supported.

See Also: imem, value.

att

att [<args>]

Examples:

"att"
attach Swat to GEOS.

Attach Swat to GEOS.

The args argument can be one of the following:

-s
reboot GEOS with error checking, attach, and stop
-sn
reboot GEOS without error checking, attach, and stop
-f
restart GEOS with error checking and attach after a pause
-r
restart GEOS with error checking and attach
-rn
restart GEOS without error checking and attach

See Also: detach, quit.

attach

attach [<boot>]

Examples:

"attach"
attach to the target PC

Attach swat to the target PC.

See Also: att, detach, quit.

autoload

autoload <function> <flags> <file> [<class> <docstring>]

Examples:

"autoload cycles 1 timing"
load the file "timing.tcl" when the cycles command is first executed. The user must type the command completely.
"autoload print 2 print"
load the file "print.tcl" when the print command is first executed. The user may abbreviate the command and the Tcl interpreter will not evaluate its arguments.

This command allows the first invocation of a command to automatically force the transparent reading of a file of Tcl commands.

0
User must type the command's name exactly. The command will be defined by "defsubr" or "defdsubr" when <file> is loaded.
1
The interpreter will not evaluate arguments passed to the command. All arguments will be merged into a single string and passed to the command as one argument. The command will use the special "noeval" argument when it is defined.

See Also: defsubr, defcommand, proc.

backtrace

backtrace [-r<reg>* ][<frames to list>]

Examples:

"backtrace"
print all the frames in the patient
"backtrace -rax"
print all the frames and the contents of AX in each one.
"where 5"
print the last five frames
"w 5"
print the last five frames

Print all the active stack frames for the patient.

See Also: up, down, func.

bin

bin <number> [<field-width>]

Examples:

"bin 5"
returns "0101" (five in binary)
"bin 10h"
returns "0001 0000"
"bin 10h 3"
returns "0000 0001 0000"

Prints numbers in binary.

bindings

bindings

Shows all current key bindings

bind-key

bind-key <ascii_value> <function>

Examples:

"bind-key \321 scroll_srcwin_down"
Binds scroll-down key to the scroll_srcwin_down Tcl routine.

Binds an ASCII value to a function.

See Also: alias, unbind-key.


bits

bits [<address>] [<length>] [<type>]

Examples:

"bits"
lists 16 bytes worth of bits at ds:si
"bits ds:di 8"
lists 8 bytes worth of bits at ds:di
"bits ds:di 24 w"
lists 24 words worth of bits at ds:di

Examine memory as a dump of bits in sets of 8, 16, or 32 (byte,word, or dword).

break-taken

 break-taken [<flag>]

Examples:

"break-taken"
Returns 1 if the machine stopped because of a breakpoint.
"break-taken 0"
Specify that no breakpoint was actually taken to stop the machine.

Obscure. This is used to determine if the machine stopped because a breakpoint was hit and taken.

Setting the break-taken flag is a rather obscure operation. It is useful primarily in complex commands that single-step the machine until a particular address is reached, or a breakpoint is taken when a breakpoint must be used to skip over a procedure call, or condense multiple iterations of an instruction with a REP prefix into 1. For an example of this use, refer to the "cycles" command.

See Also: brk, irq.

brkload

brkload [<handle>] 

Examples:

"brkload Interface"
Stop the machine when the Interface resource is loaded or swapped in.
"brkload bx"
Stop the machine when the resource whose handle ID is in BX is loaded or swapped in.
"brkload"
Stop watching for the previously-specified resource to be loaded.

Stop the machine when a particular resource is loaded into memory.

See Also: handle.

byteAsChar

var byteAsChar [(0|1)]

Examples:

"var byteAsChar 1"
Print byte variables as characters.

Determines how unsigned character variables are printed: if set non-zero, they are displayed as characters, else they are treated as unsigned integers.

bytes

bytes [<address>] [<length>]

Examples:

"bytes"
lists 16 bytes at DS:SI
"bytes ds:di 32"
lists 32 bytes at DS:SI

Examine memory as a dump of bytes and characters.

See Also: words, dwords, imem, assign.

call

 call <function> [<function args>]

Examples: "call MyFunc"
"call MyDraw ax 1 bx 1 cx 10h dx 10h"
"call FindArea box.bottom 5 box.right 5 push box"'

Call a function in the current thread.

See Also: assign, call-patient, patch.

call-patient

call-patient <function> ((<reg>|push) <value>)*

Examples:

"call-patient MemLock bx $h"
Locks down the block whose handle ID is in $h.

This is a utility routine, not intended for use from the command line, that will call a routine in the PC after setting registers to or pushing certain values.

See Also: call.


car

car <list>

Examples:

"car $args"
Returns the first element of $args.

Returns the first element of a list.

This is a lisp-ism for those most comfortable with that language. It can be more-efficiently implemented by saying [index <list> 0]

See Also: cdr.

cdr

cdr <list>

Examples:

"cdr $args"
Returns the remaining arguments yet to be processed.

Returns all but the first element of a list.

This is a lisp-ism for those most comfortable with that language. It can be more-efficiently implemented by saying [range <list> 1 end]

See Also: car.

classes

classes [<patient>]

Examples:

"classes "
Print list of classes in current patient.
"classes myapp"
Print list of classes in myapp patient.

Prints list of classes defined by the given patient.

Remember that "brk" will take address arguments of the form <class>::<message>, so you can use this function and set a breakpoint using "brk MyTextClass:: MSG_MY_TEXT_MESSAGE ". If you need a breakpoint that's limited to one object, use objbrk instead.

clrcc

clrcc <flag> [<value>]

Examples:

"clrcc c"
clear the carry flag

Clear a flag in the target computer.

The first argument is the first letter of the flag to clear. The following is a list of the flags:
t trap
i interrupt enable
d direction
o overflow
s sign
z zero
a auxiliary carry
p parity
c carry

See Also: setcc, compcc, getcc.

columns

columns

Examples:

"columns"
Return the number of columns on the screen.

Retrieves the width of the screen, if known, to allow various commands (most notably "print") to size their output accordingly.

compcc

compcc <flag>

Examples:

"compcc c"
complement the carry flag

Complement a flag in the target computer.

The first argument is the first letter of the flag to complement. The following is a list of the flags:
t trap
i interrupt enable
d direction
o overflow
s sign
z zero
a auxiliary carry
p parity
c carry
This command is handy to insert in a patch to flip a flag bit.

See Also: setcc, clrcc.

completion

completion <list-of-names>

Examples:

"completion {martial marital}"
Returns "mar," the common prefix.

Figures the common prefix from a set of strings. Used for the various forms of completion supported by top-level-read.

condenseSmall

var condenseSmall [(0|1)]

Examples:

"var condenseSpecial 0"
Force even small structures to be printed one field per line.

Controls whether "print" attempts to condense the output by printing small (< 4 bytes) structures (which are usually records in assembly language) as a list of <name> = <int>, where <name> is the field name and <int> is a signed integer.

The default value of this variable is one.

See Also: print, condenseSpecial.

condenseSpecial

var condenseSpecial [(0|1)]

Examples:

"var condenseSpecial 0"
Turns off the special formatting of various types of structures by "print".

Controls the formatting of certain structures in more-intuitive ways than the bare structure fields.

See Also: print, condenseSmall.

cont

cont

Examples:

"cont"
continue execution
"c"
continue execution

Continue GEOS.

See Also: go, istep, step, next, detach, quit.

content

content

Examples:

"vistree [content]"
print the visual tree of the content of the view under the mouse.

Print the address of the content under the view with the current implied grab.

See Also: systemobj, gentree, impliedgrab.


continue-patient

continue-patient

Examples:

"continue-patient"
Allow the target machine to continue executing GEOS.

Tell the Swat stub to let the target machine continue where it left off.

This command does not wait for the machine to stop again before it returns; once the machine is running, you're free to do whatever you want, whether it's calling "wait" or examining memory periodically.

See Also: step-patient.

cup

cup <class>
cup <object>
cup <flags>

Examples:

"cup ui::GenDocumentControlClass"
Print class hierarchy of named class
"cup ^l2850h:0034h"
Print class hierarchy of object
"cup -f"
Print class hierarchy of focus object
"cup -p"
Print class hierarchy of process

Walks up the class hierarchy, starting at a given class, printing each class encountered. May be passed an object, in which case the class of the object will be used as a starting place.

current-level

current-level

Examples:

"var l [current-level]"
Store the current interpreter nesting level in $l.

Returns the number of invocations of "top-level" (i.e. the main command input loop) currently active.

See Also: top-level.

current-registers

current-registers

Examples:

"current-registers"
Returns a list of the current registers for the current thread.

Returns all the registers for the current thread as a list of decimal numbers.

cvtrecord

cvtrecord <type> <number>

Examples:

"cvtrecord [symbol find type HeapFlags] 36"
Return a value list for the number 36 cast to a HeapFlags record.

Creates a value list for a record from a number, for use in printing out the number as a particular record using fmtval.

See Also: value, fmtval, expr, getvalue.

cycles

Count instruction cycles from now until the given address is reached. Prints out each instruction as it is executed, along with the cycles it took. If no address is given, executes until a breakpoint is hit. Takes the following (optional) flags:

-r
Print routines called, the total cycles for each routine, and a running total, not the cycles for each instruction.
-i
Same as -r, but indents to show calling level. Not recommended for counting cycles over deeply nested routines.
-I
Same as -i, except uses (#) to indicate call level
-f
Stop counting when this routine finishes
-n
Does not whine about interrupts being off
-x < routine >
Step over calls to <routine>
-x < routine >=< val >
Step over calls to <routine> and assume that the call takes <val> cycles for timing purposes

See Also: timingProcessor.


dbrk

dbrk <addr> <num> [<command>|default]
dbrk set <break> <num> [<command>|default]
dbrk list [<break>]
dbrk {clear,delete} <break>
dbrk cur <break> <num>
dbrk max <break> <num>
dbrk cmd <break> [<command>]
dbrk reset <break>
dbrk enable <break>
dbrk disable <break>

Examples:

"dbrk ObjMessage 30"
Break at the 30th call to ObjMessage
"dbrk set 5 30"
Break after hitting brk5 30 times.
"dbrk set brk3 10 default"
Break after hitting brk3 10 times; Each time brk3 is hit, perform the default command.
"dbrk cmd brk2 {echo foo}"
Echo a string whenever brk2 is hit.
"dbrk cmd brk2 default"
Use the default command for brk2.
"dbrk disable 2"
Stop counting brk2; it will now always be taken.

This command creates "delayed" breakpoints, creating breakpoints that don't activate until they've been hit a specified nuber of times.

dcache

dcache bsize <blockSize>
dcache length <numBlocks>
dcache stats
dcache params
dcache (on|off)

Examples:

"dcache bsize 16"
Set the number of bytes fetched at a time to 16.
"dcache length 1024"
Allow 1024 blocks of the current block size to be in the cache at a time.
"dcache off"
Disables the Swat data cache.

Controls the cache Swat uses to hold data read from the target machine while the machine is stopped.

See Also: cache.

dcall

dcall [<args>]

Examples:

"dcall Dispatch"
Display when the routine Dispatch is called
"dcall none"
stop displaying all routines

Display calls to a routine.

See Also: showcalls, mwatch.


debug

debug <proc-name>*

Examples:

"debug"
Enter the Tcl debugger immediately.
"debug fooproc"
Enter the Tcl debuffer when the interpreter is about to execute the command "fooproc".

This command is used when debugging Tcl commands. It sets a breakpoint at the start of any Tcl command. Also serves as a breakpoint in the middle of a Tcl procedure, if executed with no argument.

See Also: undebug.

debugger

var debugger [<command-name>]

Name of the command when things go wrong. The function is passed two arguments: a condition and the current result string from the interpreter. The condition is "enter" if entering a command whose debug flag is set, "exit" if returning from a frame whose debug flag is set, "error" if an error occurred and the "debugOnError" variable is non-zero, "quit" if quit (^ is typed and the "debugOnReset" variable is non-zero, or "other" for some other cause (e.g. "debug" being invoked from within a function).

debugOnError

var debugOnError [(0|1)]

Examples:

"var debugOnError 1"
Turn on debugging when there's a Tcl error.

Enter debug mode when Swat encounters a Tcl error.

See Also: debugger.

defcmd

defcmd <name> <args> <help-class> <help-string> <body>

Examples: Look at almost any .tcl file in the system library for an example; a complete example set would be too large to give here.

This creates a new Tcl procedure with on-line help whose name the user may abbreviate when invoking.

See Also: defcommand, proc, help.

defcommand

defcommand <name> <args> <help-class> <help-string> <body>

Examples: Look at almost any .tcl file in the system library for an example.

This creates a new Tcl procedure with on-line help whose name must be given exactly when the user wishes to invoke it.

<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "prog.tcl" would have its <help-string> stored as "prog.tcl.foo."

See Also: defcmd, proc, help.

defhelp

defhelp <topic> <help-class> <help-string>

Examples:

"defhelp breakpoint top {Commands relating to the setting of breakpoints}"
Sets the help for "breakpoint" in the "top" category to the given string.

This is used to define the help string for an internal node of the help tree (a node that is used in the path for some other real topic, such as a command or a variable).

See Also: help.

defvar

defvar <name> <value> [<help-class> <help-string>]

Examples:

"defvar printRegions 0"
Define "printRegions" as a global variable and give it the value zero, if it didn't have a value already.

This command is used in .tcl files to define a global variable and give it an initial value, should the variable not have been defined before.

See Also: var, help.


delassoc

delassoc <list> <key> [<foundvar> [<elvar>]]

Examples:

"delassoc $val murphy"
Returns $val without the sublist whose first element is the string "murphy."

Deletes an entry from an associative list.

See Also: assoc.

detach

detach [<options>]

Examples:

"detach cont"
continue GEOS and quit swat

Detach swat from the PC.

See Also: attach, quit.

dirs

dirs

Prints the directory stack for the current thread.

See Also: pwd, stdpaths.

discard-state

discard-state

Examples:

"discard-state"
Throw away the values for all the thread's registers as saved by the most recent call to save-state .

Throw away the state saved by the most-recent save-state command.

This is usually only used in response to an error that makes it pointless to return to the point where the save-state was performed.

See Also: save-state, restore-state.

diskwalk

diskwalk <drive>

Examples:

"diskwalk F"
Prints the disks registered in drive F.
"diskwalk"
Prints all the disks registered with the system.

Prints out the information on registered disks.

The Flags column is a string of single-character flags with the following meanings:

w
The disk is writable.
V
The disk is always valid, i.e. it's not removable.
S
The disk is stale. This is set if the drive for the disk has been deleted.
u
The disk is unnamed, so the system has made up a name for it.

See Also: drivewalk.

display

display <lines> <command>
display list
display del <num>

Examples:

"display list"
list all the commands displayed
"display 1 {piv Vis VCNI_viewHeight}"
always display the view height
"display del 2"
delete the second display command

Manipulate the display at the bottom of Swat's screen.

See Also: wtop, wcreate.

dosMem

dosMem

Examples:

"dosMem"

Traverse DOS' chain of memory blocks, providing information about each.

down

down [<frame offset>]

Examples:

"down"
move the frame one frame down the stack
"down 4"
move the frame four frames down the stack

Move the frame down the stack.

See Also: backtrace, up.


drivewalk

drivewalk

Examples:

"drivewalk"
Prints the table of drives known to the system.

Prints out all disk drives known to the system, along with their current status.

See Also: diskwalk.

dumpstack

dumpstack [<address>] [<length>]

Examples:

"dumpstack"
dump the stack at SS:SP
"ds ds:si 10"
dump ten words starting at DS:SI

Dump the stack and perform some simple interpretation upon it.

See Also: backtrace.

dwordIsPtr

var dwordIsPtr [(0|1)]

Examples:

"var dwordIsPtr 1"
Tells "print" to print all double-word variables as if they were far pointers (segment:offset).

Controls whether dword (a.k.a. long) variables are printed as 32-bit unsigned integers or untyped far pointers.

See Also: intFormat, print.

dwords

dwords [<address>] [<length>]

Examples:

"dwords"
lists 4 double words at DS:SI
"dwords ds:di 8"
lists 8 double words at DS:DI

Examine memory as a dump of double words (32 bit hex numbers).

See Also: bytes, words, imem, assign.

ec

ec [<args>]

Examples:

"ec"
list the error checking turned on
"ec +vm"
add vmem file structure checking
"ec all"
turn on all error checking (slow)
"ec save none"
save the current error checking and then use none
"ec restore"
use the saved error checking flags

Get or set the error checking level active in the kernel.

See Also: why.

echo

echo [-n] <string>+

Examples:

"echo -n yes?"
Prints "yes?" without a newline.
"echo hi mom"
Prints "hi mom" followed by a newline.

Prints its arguments, separated by spaces.

If the first argument is "-n", no newline is printed after the arguments.

See Also: flush-output.


elist

elist [<patient>]

Examples:

"elist"
list the events for the current thread and patient
"elist ui"
list the events for the last thread of the ui patient
"elist :1"
list the events for the first thread of the current patient
"elist geos:2"
list the events for the second thread of the GEOS patient

Display all events pending for a patient.

The <patient> argument is of the form `patient:thread'. Each part of the patient name is optional, and if nothing is specified then the current patient is listed.

See Also: showcalls.

ensure-swat-attached

ensure-swat-attached

Examples:

"ensure-swat-attached"
Stop if Swat isn't attached to GEOS.

If Swat is not attached to GEOS, display an error and stop a command.

Use this command at the start of any other command that accesses the target PC. Doing so protects the user from the numerous warnings that can result from an attempt to read memory when not attached.

eqfind

eqfind [-p]

Examples:

"eqfind" list all event queues in the system.
"eqfind -p" list and print all event queues in the system.

Display all event queues in the system.

See Also: elist, eqlist, erfind.

eqlist

eqlist <queue handle> <name>

Examples:

"eqlist 8320 geos:2"
show the event list for geos:2

Display all events in a queue.

See Also: elist.

erfind

erfind [-p]

Examples:

"erfind" list all recorded event handles in the system.
"erfind -p" list and print all recorded event handles in the system.

Display all record event handles in the system. These are events that have been recorded but not necessarily sent anywhere, so they will not appear in the queue of any thread.

See Also: elist, eqlist, eqfind, pevent.

exit

exit <patient>

Examples:

"exit faxmon"
Causes the faxmon application to exit.

Sends messages required to make an application quit.

This command does nothing when you're stopped at FatalError , as it will wait until the machine is idle before attempting to send MSG_META_QUIT ; continuing from FatalError will cause the system to exit.

See Also: run.

exit-thread

exit-thread [<exit-code>]

Examples:

"exit-thread"
Exit the current thread, returning zero to its parent.
"exit-thread 1"
Exit the current thread, returning one to its parent.

Exit the current thread.

See Also: quit.

explain

explain

Examples: "explain"

Print a more detailed description of why the system crashed, if possible.

explode

explode <string> [<sep-set>]

Examples:

"explode $args"
Breaks the string stored in the variable "args" into a list of its individual letters.
"explode $file /"
Breaks the string stored in the variable "file" into a list of its components, using "/" as the boundary between components when performing the split.

Breaks a string into a list of its component letters, allowing them to be handled quickly via a foreach loop, or the map or mapconcat commands.

This is especially useful for parsing command switches.

See Also: foreach, index, range.


fatalerr_auto_explain

var fatalerr_auto_explain [(0|1)]

Examples:

"var fatalerr_auto_explain 0"
Turn off automatic generation of the explanation for any fatal-error hit.

Determines if the "why" command will automatically provide you with an explanation of any fatal error you encounter. If non-zero, they will be provided whenever FatalError is hit.

fetch-optr

fetch-optr <handle> <offset>

Examples:

"fetch-optr $h $o.GI_comp.CP_firstChild"
Fetch the optr from the GI_comp.CP_firstChild field of the object at ^h$h:$o.

Extracts an optr from memory, coping with the data in the block that holds the optr not having been relocated yet.

fhandle

fhandle <handle id>

Examples: "fhandle 3290h"

Print out a file handle.

See Also: fwalk.

field

field <list> <field name>

Examples:

"field [value fetch ds:si MyBox] topLeft"
return the offset of the topLeft field in MyBox

Return the value for the field's offset in the structure.

See Also: value, pobject, piv.

fieldwin

fieldwin

Print the address of the target machine's current top-most field window.

find

find [-ir] <string> [<filename>]

Examples:

"find FileRead"
Find next occurrence of string "FileRead" in currently viewed file
"find FI_foo poof.goc"
find first occurrence of string "FI_foo" in file poof.goc.
"find -ir myobject"
case-insensitive reverse search for most recent occurrence of string "myobject" in currently viewed file

Finds a string in a file and brings the line with that string to the middle of Swat's source window.

find-opcode

find-opcode <addr> <byte>+

Locates the mnemonic for an opcode and decodesit. Accepts the address from which the opcode bytes were fetched, and one or more opcode bytes as arguments. Returns a list of data from the opcode descriptor:

{name length branch-type args modrm bRead bWritten inst}

length is the length of the instruction.

branch - type is one of:

1
none (flow passes to next instruction)
j
absolute jump
b
pc-relative jump (branch)
r
near return
R
far return
i
interrupt return
I
interrupt instruction

Any argument descriptor that doesn't match is to be taken as a literal. E.g. AX as a descriptor means AX is that operand.

modrm is the modrm byte for the opcode.

bRead is the number of bytes that may be read by the instruction, if one of its operands is in memory.

bWritten is the number of bytes that may be written by the instruction, if one of its operands is in memory.

inst is the decoded form of the instruction. If not enough bytes were given to decode the instruction, inst is returned as empty.

finish

finish [<frame num>]

Examples:

"finish"
finish executing the current frame
"finish 3"
finish executing up to the third frame

Finish the execution of a frame.

See Also: backtrace.

finishframe

finishframe [<frame-token>]

Examples:

"finishframe $cur"
Run the machine to continue until it has returned from a particular stack frame.

Allows the machine to continue until it has returned from a particular stack frame.

See Also: event, frame, finish.


flagwin

flagwin [<on>|off]

Turns on or off a window providing a continuous display of the machine flags (e.g. zero, carry).

See Also: pflags.

flowobj

flowobj

Examples:

"pobject [flowobj]"
print out the flow object.

Prints out address of the uiFlowObj, which is the object which grabs the mouse.

This command is normally used with pobject to print out the object.

flush-output

flush-output

Examples:

"flush-output"
Forces pending output to be displayed.

Flushes any pending output (e.g. waiting for a newline) to the screen.

See Also: echo.

fmtoptr

fmtoptr <handle-id> <chunk>

Examples:

"fmtoptr 3160h o"
Prints a description of the object whose address is ^l3160h:0 (likely a thread/process).

Takes a global and a local handle and prints a description of the object described by that optr.

See Also: print.

fmtval

fmtval <value-list> <type-token> <indent> [<tail> [<one-line>]]

Examples:

"fmtval [value fetch foo] [symbol find type FooStruct] 0"
Prints the value of the variable foo, which is assumed to be of type FooStruct.

This is the primary means of producing nicely-formatted output of data in Swat. It is used by both the "print" and "_print" commands and is helpful if you want to print the value of a variable without entering anything into the value history.

See Also: print, _print, fmtoptr, threadname.

focus

focus [<object>]

Examples:

"focus"
print focus hierarchy from the system object down
"focus -i"
print focus hierarchy from implied grab down
"focus ^l4e10h:20h"
print focus hierarchy from ^l4e10h:20h down
"focus [content]"
print focus hierarchy from content under mouse.

Prints the focus hierarchy below an object.

See Also: target, model, mouse, keyboard, pobject.

focusobj

focusobj

Examples:

"focusobj"
print model hierarchy from system object down
"pobj [focusobj]"
Do a pobject on the focus object (equivalent to "pobj -f").

Returns the object with the focus.

See Also: focus, target, model, targetobj, modelobj.

fonts

fonts [<args>]

Examples:

"fonts"
summarize general font usage
"fonts -u"
list fonts currently in use

Print various font info.

See Also: pfont, pfontinfo, pusage, pfontinfo.


fpstack

fpstack

Examples:

"fpstack"
Prints out the hardware and software floating point stacks for the patient.

Prints out the hardware and software floating point stacks for the patient.

See Also: fpu-state.

fpu-state

fpustate [<mode>]

Examples:

"fpustate"
Print out the state of the coprocessor.
"fpustate w"
Dumps actual words of the numbers.

Prints out the current state of the coprocessor, if any.

See Also: fpstack.

frame

frame top
frame cur
frame get <ss> <sp> <cs> <ip>
frame next <frame>
frame prev <frame>
frame function [<frame>]
frame funcsym [<frame>]
frame scope [<frame>]
frame info [<frame>]
frame patient [<frame>]
frame register <regName> [<frame>]
frame set [<frame>]
frame setreg <regName> <value> [<frame>]
frame +<number>
frame -<number>
frame <number>

Examples:

"var f [frame top]"
Fetches the token for the frame at the top of the current thread's stack and stores it in the variable "f"
"var f [frame next $f]"
Fetches the token for the next frame up the stack (away from the top) from that whose token is in $f
"frame register ax $f"
Returns the value of the AX register in the given frame.
"frame 1"
Sets the current frame for the current thread to be the top-most one.

This command provides access to the stack-decoding functions of swat. Most of the subcommands deal with frame tokens, but a few also handle frame numbers, for the convenience of the user.

See Also: addr-parse, switch.

framewin

framewin [del]

Examples:

"framewin"
Creates a single-line window to display info about the current stack frame.
"framewin del"
Deletes the window created by a previous "framewin".

Creates a window in which the current stack frame is always displayed.

See Also: display, regwin, srcwin.

freeze

freeze [<patient>]
freeze :<n>
freeze <patient>:<n>
freeze <id> 

Examples:

"freeze"
Freezes the current thread.
"freeze term"
Freezes the application thread for "term"
"freeze :1"
Freezes thread #1 of the current patient
"freeze 16c0h"
Freezes the thread whose handle is 16c0h.

Freezing a thread prevents a thread from running unless it's the only thread that's runnable in the entire system.

See Also: thaw.

fullscreen

fullscreen

Examples:

"fullscreen"

Prints the full screen hierarchy from the system object down.


func

func [<func name>]

Examples:

"func"
return the current function.
"func ObjMessage"
set the frame to the first frame for ObjMessage.

Get the current function or set the frame to the given function.

See Also: backtrace, up, down, finish.

fvardata

fvardata <token> [<address>]

Examples:

"fvardata ATTR_VIS_TEXT_STYLE_ARRAY *ds:si"

Locates and returns the value list for the data stored under the given token in the vardata of the given object.

fwalk

fwalk [<patient>]

Examples:

"fwalk"
list all open files.
"fwalk geos"
list all open files owned by the GEOS patient.

Print the list of files open anywhere in the system.

See Also: fhandle, geosfiles, sysfiles.

gc

gc [(off|register|<extensive-heap-checking-flag>]

Implements a simple garbage collector to scavenge unreferenced symbols and types. If given an argument other than "off" or "register," it turns on extensive heap checking, which slows things down enormously but ensures the heap is in good shape. The "gc register" command can be use to register a type created by "type make"as something that is being used for an extended period at the Tcl level, preventing the thing from being garbage-collected.

gentree

gentree [<address>] [<instance field>]

Examples:

"gentree"
print the generic tree starting at *DS:SI
"gentree -i"
print the generic tree under the mouse
"gentree [systemobj]"
print the generic tree starting at the system's root
"gentree @23 GI_states"
print the generic tree with generic states
"gentree *uiSystemObj"
start the generic tree at the root of the system

Print a generic tree.

See Also: gup, vistree, impliedgrab, systemobj, pobject.

geosfiles

geosfiles

Examples: "geosfiles"

Print out all the files for which I/O is currently pending in GEOS.

See Also: sysfiles, sftwalk, fwalk.

geos-release

This variable contains the major number of the version of GEOS running on the target PC.

geowatch

geowatch [<object>]

Examples:

"geowatch *MyObj"
Display geometry calls that have reached the object MyObj
"geowatch"
Display geometry calls that have reached *ds:si (asm) or oself (goc)

This displays geometry calls that have reached a particular object. Only one object at a time can be watched in this way.

See Also: objwatch, mwatch, cbrk, pobject.

get-address

Used by the various memory-access commands. Takes one argument, ADDR, being the address argument for the command. Typically, the command is declared as

[defcmd cmd {{addr nil}} ... ]

allowing the address to be unspecified. This function will return the given address if it was, else it will return the last-accessed address (stored in the global lastAddr variable as a 3-tuple from addr-parse) in the form of an address expression. If no address is recorded ( lastAddr is nil), the default-addr argument is used. If it is not specified then CS:IP will be used.

getcc

getcc <flag>

Examples:

"getcc c"
Get the carry flag.

Get a flag from the target machine.

See Also: setcc, clrcc, compcc.


getenv

getenv <NAME>

Examples:

"getenv PTTY"
Fetches the value of the host machine's PTTY environment variable.

Returns the value for a variable defined in Swat's environment.

If the variable isn't defined, this returns the empty string.

See Also: var, string.

get-key-binding

get-key-binding <char>

Examples:

"get-key-binding c"
Gets key binding for the character c.
"get-key-binding \045"
Gets key binding for the % key.

Gets key binding for given key.

See Also: alias, bind-key, unbind-key.

getvalue

getvalue <expr>

Examples:

"getvalue MSG_META_DETACH "
Returns the integer value of the symbol MSG_META_DETACH.

This is a front-end to the "addr-parse" command that allows you to easily obtain the integer value of any expression. It's most useful for converting something the user might have given you to a decimal integer for further processing.

If the expression you give does not evaluate to an address (whose offset will be returned) or an integer, the results of this function are undefined.

See Also: addr-parse, addr-preprocess.

go

go [<address expressions>]

Examples:

"go"
"go drawLeftLine"

Go until an address is reached.

See Also: break, continue, detach, quit.

gup

gup [<address>] [<instance field>]

Examples:

"gup"
print the generic object at *DS:SI and its ancestors
"gup @23 GI_states"
print the states of object @23 and its ancestors
"gup -i"
print the generic object under the mouse and the object's ancestors

Print a list of the object and all of its generic ancestors.

See Also: gentree, vup, vistree, impliedgrab.

handles

handles [<flags>] [<patient>]

Examples: "handles"
"handles -f"
"handles ui"

Print all handles in-use.

See Also: lhwalk, phandle, hgwalk.


handsum

handsum

Examples:

"handsum"
Summarize the use to which the handle table is being put.

This command analyzes the handle table and prints out a list of the number of handles being used by each geode, and for what purpose.

hbrk

    hbrk <address> (byte|word) (match|mismatch) <value>

Examples:

"hbrk scrollTab+10 byte match 0"
print message handlers until a zero is written at scrollTab+10.
"hbrk OLScrollButton+3 word mismatch 0x654f"
Break when the word at OLScrollButton+3 is destroyed.

Break when a memory location changes.

See Also: brk, mwatch, showcalls.

heapspace

heapspace <geode>
heapspace total 
heapspace syslib 

Examples:

"heapspace geomanager"
print out "heapspace" value for geomanager
"heapspace total"
print out maxTotalHeapSpace
"heapspace syslib"
print out space being used by system libraries.

Prints out how much space the program requires on the heap. This value may then be used in a "heapspace" line of the program's .gp field. This command only determines present usage--to determine the most heapspace your geode will ever use requires that you make it allocate as much space as it ever will. This means pulling down all menus, opening all dialog boxes, and generally building out all UI gadgetry. The value this command prints is roughly the non-discardable heap usage by the app and any transient libraries that it depends on, plus an additional amount for thread activity.

When using this command, you should run your application on the device it is to run on. One or more system libraries may be XIP (running from ROM) on the device, but run from RAM on your target PC's emulator. Thus, to get a more accurate picture of memory usage, run the application on the planned device.


help

help [<command>]

This is the user-level access to the on-line help facilities for Swat. If given a topic (e.g. "brk") as its argument, it will print all help strings defined for the given topic (there could be more than one if the same name is used for both a variable and a procedure, for instance). If invoked without arguments, it will enter a browsing mode, allowing the user to work his/her way up and down the documentation tree.

help-fetch

help-fetch <topic-path>

Examples: "help-fetch top.patient"

Fetches the help string for a given topic path in the help tree.

If there is more than one node with the given path in the help tree, only the string for the first node will be returned.

help-fetch-level

help-fetch-level

Examples:

"help-fetch-level top.prog.obscure"
Returns the topics within the "top.prog.obscure" level of the help tree.

Returns a list of the topics available at a given level in the help tree.

The result is a list of node names without leading path components.

See Also: help-fetch.

help-help

help-help

Provides help about using the help command (q.v.)

See Also: help.

help-is-leaf

help-is-leaf <topic-path>

Examples:

"help-is-leaf top.prog"
See if top.prog is a leaf node in the help tree (i.e. if it has no children).

Determines whether a given path refers to a help topic or a help category.

Returns one if the given path refers to a leaf node, zero if it is not.

See Also: help-fetch, help-fetch-level.

help-minAspect

var help-minAspect [<ratio-times-ten>]

If non-zero, contains the minimum aspect ratio to be maintained when displaying tables in the help browser. The ratio is expressed as the fraction

entries_per_column*10/number_of_columns

E.g. a minimum ratio of 1.5 would be 15. (We multiply by ten because Swat doesn't support floating point numbers.)

help-scan

help-scan <pattern>

Examples:

"help-scan break"
Looks for all nodes at any level of the help tree whose documentation includes the pattern "break".

Scans all nodes in the help tree for those whose documentation matches a given pattern.

See Also: help-fetch.

help-verbose

var help-verbose [0|1)]

If non-zero, performs verbose prompting.

hex

hex <number>

Examples:

"hex 034"
print hex equivalent of octal 34.
"hex 12"
print hex equivalent of decimal 12.

Print hexadecimal equivalent of a number.

hgwalk

hgwalk

Examples:

"hgwalk"
print statistics on all geodes

Print out all geodes and their memory usage.

history

history [<args>]

Examples:

"history 10"
Prints the last 10 commands entered via the "history subst" command.
"history subst $line"
Performs history substitution on the string in $line, enters the result in the history queue and returns the result.
"var n [history cur]"
Stores the number of the next string to be entered via "history subst" in the variable n.
"history set 50"
Limit the number of entries in the queue to 50.
"history fetch 36"
Returns the string entered as command number 36 in the history queue.

This command manipulates the history list. Options are:

<number>
Prints the most-recent <number> commands
set <queue-size>
Sets the number of commands saved
subst <str>
Performs history substitution on <str> and enters it into the history queue.
cur
Returns the current history number. If no argument is given, all saved commands are printed.
fetch <n>
Returns the string entered as command number <n> in the history queue.

hwalk

hwalk [<flags>] [<patient>]

Examples:

"hwalk"
display the heap
"hwalk -e"
display the heap and perform error checking
"hwalk -r ui"
display the heap owned by the ui in reverse order

Print the status of all blocks on the global heap.

See Also: lhwalk, phandle, handles, hgwalk.

iacp

iacp -ac
prints all connections

iacp -l
prints all lists without connections

iacp -d
prints all open documents

iacp <obj>
prints all connections to which <obj> is party

ibrk

Set a breakpoint interactively. At each instruction, you have several options:

q
Quit back to the command level.
n
Go to next instruction (this also happens if you just hit return).
p
Go to previous instruction.
P
Look for a different previous instruction.
^D
Go down a "page" of instructions. The size of the page is controlled by the global variable ibrkPageLen. It defaults to 10.
^U
Go up a "page" of instructions.
b
Set an unconditional breakpoint at the current instruction and go back to command level.
a
Like 'b', but the breakpoint is set for all patients.
t
Like 'b', except the breakpoint is temporary and will be removed the next time the machine stops.
B
Like 'b', but can be followed by a command to execute when the breakpoint is hit.
A
Like 'B', but for all patients.
T
Like 'B', but breakpoint is temporary.

ibrkPageLen

var ibrkPageLen [<number-of-lines>]

Number of instructions to skip when using the ^D and ^U commands of ibrk.

ignerr

ignerr

Examples:

"ignerr" ignore error and continue
"ignerr MyFunc::done" ignore error and continue at MyFunc::done.

Ignore a fatal error and continue.

See Also: why, backtrace.


imem

imem [<address>] [<mode>]

Examples:

"imem"
enter imem mode at DS:SI
"imem ds:di"
enter imem mode at DS:SI

Examine memory and modify memory interactively.

See Also: bytes, words, dwords, assign.

imemPageLen

var imemPageLen [<numlines>]

Contains the number of elements to display when imem is given the ^D or ^U command.

impliedgrab

impliedgrab

Examples:

"gentree [impliedgrab]"
print the generic tree under the mouse

Print the address of the current implied grab, which is the screen object grabbing the mouse.

See Also: systemobj, gentree.

impliedwin

impliedwin
"wintree [impliedwin]"
print the window tree of the window under the mouse

Print the address of the current implied window (the window under the mouse).

int

int [<int level> <state>]

Examples:

"int"
report the interrupt statuses
"int 1:1 on"
allow keyboard interrupt while in swat

Set or print the state of the two interrupt controllers for when then machine is stopped in Swat.

intFormat

var intFormat [<format-string>]

Examples:

"var intFormat %d"
Sets the default format for printing unsigned integers to decimal.

$intFormat contains the string passed to the "format" command to print an integer.

The default value is {%xh}, which prints the integer in hexadecimal, followed by an "h".

See Also: print, byteAsChar.


intr

Catch, ignore, or deliver an interrupt on the target PC. First argument is the interrupt number. Optional second argument is "catch" to catch delivery of the interrupt, "ignore" to ignore the delivery, or "send" to send the interrupt (the machine will keep going once the interrupt has been handled). If no second argument is given, the interrupt is delivered.

io

io [w] <port> [<value>]

Examples:

"io 21h"
Reads byte-sized I/O port 21h.
"io 20h 10"
Writes decimal 10 to byte-sized I/O port 20h.

Provides access to any I/O port on the PC.

irq

irq
irq (no|yes)
irq (set|clear)

Examples:

"irq"
Returns non-zero if an interrupt is pending.
"irq no"
Disable recognition and acting on a break request from the keyboard.
"irq set"
Pretend the user typed Ctrl-C.

Controls Swat's behavior with respect to interrupt requests from the keyboard.

is-obj-in-class

is-obj-in-class <obj-addr> <class-name>

Examples:

"is-obj-in-class ^l4e10h:1eh GenPrimaryClass"
see if the object at ^l4e10h:1eh is in GenPrimaryClass .

Returns whether a given object is in the specified class.

See Also: psup.

istep

istep [<default command>]

Examples:

"is"
enter instruction step mode
"istep n"
enter instruction step mode, <ret> does a next command

Step through the execution of the current patient. This is THE command for stepping through assembly code.

See Also: sstep, listi.


keyboard

keyboard [<object>]

Examples:

"keyboard"
print keyboard hierarchy from system object down
"keyboard -i"
print keyboard hierarchy from implied grab down
"keyboard ^l4e10h:20h"
print keyboard hierarchy from ^l4e10h:20h down.

Prints the keyboard hierarchy below an object.

See Also: target, focus, mouse, model, pobject.

keyboardobj

keyboardobj

Examples:

"keyboardobj"
return object with keyboard grab
"pobj [keyboardobj]"
do a pobject on the object with the keyboard grab (equivalent to "pobj -kg".

Returns the object with the keyboard grab.

See Also: target, focus, mouse, keyboard, mouseobj.

lastCommand

$lastCommand

Examples:

"var repeatCommand $lastCommand"
Set the current command as the command to execute next time.

$lastCommand stores the text of the command currently being executed.

This variable is set by top-level-read. Setting it yourself will have no effect, unless you call set-address or some similar routine that looks at it.

See Also: repeatCommand.

lhwalk

lhwalk [<address>]

Examples:

"lhwalk 1581h"
list the lm heap at 1581h:0

Prints out information about a local memory heap.

See Also: hwalk, objwalk.

link

link <library> [<patient>]

Examples:

"link motif"
Makes the library "motif" a library of the current patient as far as Swat is concerned.

Allows you to link a patient to act as an imported library of another patient, even though the other patient doesn't actually import the patient. This is useful only for symbol searches.

See Also: help-fetch.

listi

listi [<address>] [<length>]

Examples:

"l"
disassemble at the current point of execution
"listi geos::Dispatch"
disassemble at the kernel's dispatch routine
"listi DocClip:IsOut"
disassemble at the local label
"listi cs:ip 20"
disassemble 20 instructions from the current point of execution

Disassemble at a memory address.

See Also: istep, sstep, skip.


load

load <file>

Load a file of Tcl commands.

loadapp

Load an application from swat. Single argument is the file name of the application to launch (application must reside in the appl subdirectory of the GEOS tree).

The application is opened in normal application mode. Note that the application will not be loaded until you continue the machine, as the loading is accomplished by sending a message to the UI.

loadgeode

Load a geode from swat. Mandatory first argument is the name of the file to load (with path from top-level GEOS directory, using / instead of \ as the path separator).

Second and third arguments are the data words to pass to the geode. The second argument is passed to the geode in cx, while the third argument is passed in dx.

Both the second and third arguments are optional and default to 0. They likely are unnecessary.

locals

locals [<func>]

Examples:

"locals"
Print the values of all local variables and arguments for the current frame.
"locals WinOpen"
Print the names of all local variables for the given function. No values are printed.

Allows you to quickly find the values or names of all the local variables of a function or stack frame.

See Also: print, frame, info.

localwin

localwin [<numlines>]

Examples:

"localwin"
Display local variables in a 10-line window
"localwin 15"
Display local variables in a 15-line window
"localwin off"
Turn off the local variable display

Turn on or off the continuous display of local variables.

loop

Simple integer loop procedure. Usage is:
loop <loop-variable> <start>,<end> [step <step>] <body>

<start>, <end>, and <step> are integers. <body> is a string for Tcl to evaluate. If no <step> is given, 1 or -1 (depending as <start> is less than or greater than <end>, respectively) is used. <loop-variable> is any legal Tcl variable name.

map

map <var-list> <data-list>+ <body>

Examples:

"map {i j} {a b} {c d} {list $i $j}"
Executes the command "list $i $j" with i and j assigned to successive elements of the lists {a b} and {c d}, respectively, merging the results into the list {{a c} {b d}}

This applies a command string to the successive elements of one or more lists, binding each element in turn to a variable and evaluating the command string. The results of all the evaluations are merged into a result list.

See Also: foreach, mapconcat.

mapconcat

mapconcat <var-list> <data-list>+ <body>

Examples:

"mapconcat {i j} {a b} {c d} {list $i $j}"
Executes the command "list $i $j" with i and j assigned to successive elements of the lists {a b} and {c d}, respectively, merging the results into a string.

map-method

map-method <number> <object>
map-method <number> <class-name> [<object>]

Examples:

"map-method ax ^lbx:si"
Prints the name of the message in ax, from the object at ^lbx:si's perspective.
"map-method 293 GenClass"
Prints the name of message number 293 from GenClass's perspective.

Maps a message number to a human-readable message name, returning that name. This command is useful both for the user and for a Tcl procedure.

See Also: obj-class.

mcount

mcount [<args>]

Examples:

"mcount"
start the method count or print the count
"mcount reset"
restart the method count
"mcount stop"
stop the method count
"mcount MyAppRecalcSize"
count messages handled by MyAppRecalcSize

Keep a count of the methods called.

The args argument may be one of the following:

nothing
start the method count or print the current count
'reset'
reset the count to zero
'stop'
stop the method count and remove it's breakpoint
message handler
start the method count for a particular method

See Also: mwatch, showcalls.


memsize

memsize [<memory size>]

Examples:

"memsize"
"memsize 512"

Change the amount of memory that GEOS thinks that it has.

methods

methods <class>
methods <object>
methods <flags>

Examples:

"methods -p"
Print out methods defined for process
"methods ui::GenDocumentClass"
Print out GenDocumentClass methods
"methods 3ffch:072fh"
Print out methods for class at addr
"methods -a"
Print methods of top class of app obj

Prints out the method table for the class specified, or if an object is passed, for the overall class of the object. Useful for getting a list of candidate locations to breakpoint.

model

model [<object>]

Examples:

"model"
print model hierarchy from system object down
"model -i"
print model hierarchy from implied grab down
"model ^l4e10h:20h"
print model hierarchy from ^l4e10h:20h down.

Prints the model hierarchy below an object.

See Also: target, focus, mouse, keyboard, pobject.

modelobj

modelobj

Examples:

"modelobj"
print model hierarchy from system object down
"pobj [modelobj]"
Do a pobject on the object with the model grab (the equivalent of a "pobj -m").

Returns the object with the model grab.

See Also: target, focus, model, focusobj, targetobj.

mouse

mouse [<object>]

Examples:

"mouse"
print mouse hierarchy from system object down
"mouse -i"
print mouse hierarchy from implied grab down
"mouse ^l4e10h:20h"
print mouse hierarchy from ^l4e10h:20h down.

Prints the mouse hierarchy below an object.

See Also: target, focus, model, keyboard, pobject.

mouseobj

mouseobj

Examples:

"mouseobj"
return object with mouse grab
"pobj [mouseobj]"
do a pobject on the object with the mouse grab (equivalent to "pobj -mg").

Returns the object with the mouse grab.

See Also: target, focus, mouse, keyboard, keyboardobj.

mwatch

mwatch <msg>+
mwatch add <msg>+
mwatch list
mwatch clear

Examples:

"mwatch MSG_VIS_DRAW MSG_METAQUIT"
watch these messages
"mwatch add MSG_META_START_SELECT "
watch this message also
"mwatch"
clear all message watches

Display all deliveries of a particular message.

See Also: objwatch, objbrk, objmessagebrk, procmessagebrk.

next

next

Examples:

"next"
execute the next assembly instruction without entering it
"n"

Execute the patient by a single assembly instruction, skipping over any calls, repeated instructions, or software interrupts.

See Also: step, istep.


noStructEnum

var noStructEnum [(0|1)]

Examples:

"var noStructEnum 1"
Don't put "struct" or "enum" before the data type for variables that are structures or enumerated types.

Structure fields that are structures or enumerated types normally have "struct" or "enum" as part of their type description. This usually just clutters up the display, however, so this variable shuts off this prepending.

The default value of this variable is one.

See Also: print.

null

null <val>

Examples:

"null $sym"
Sees if the symbol token stored in $sym is the empty string or "nil."

Checks to see if a string is either empty or "nil," special values returned by many commands when something isn't found or doesn't apply. Returns non-zero if <val> is either of these special values.

The notion of "nil" as a value comes from lisp.

See Also: index, range.

objbrk

objbrk [<obj address>] [<message>]

Examples:

"objbrk ds:si MSG_VIS_DRAW "
break when a MSG_VIS_DRAW reaches the object
"objbrk -p"
Break when any message is sent to the process object.

Break when a particular message reaches a particular object.

See Also: objwatch, objmessagebrk, mwatch.

obj-class

objclass <obj-addr>

Examples:

"var cs [obj-class ^lbx:si]"
Store the symbol token for the class of the object ^lbx:si in the variable $cs.

Figures out the class of an object, coping with unrelocated object blocks and the like.

See Also: symbol.

objcount

objcount [-q] [-X] [-Y] [-b #] [-o #] [-p #]

Examples:

"objcount"
count all objects
"objcount -p welcome"
count all objects owned by welcome
"objcount -o *desktop::DiskDrives"
count this one object
"objcount -b 0x3270"
count all objects in this block.

Count up instances of various objects on the heap.

See Also: hwalk, objwalk, lhwalk.

obj-foreach-class

obj-foreach-class <function> <object> [<args>]

Examples:

"obj-foreach-class foo-callback ^lbx:si"
calls foo-callback with each class in turn to which the object ^lbx:si belongs.

Processes all the classes to which an object belongs, calling a callback procedure for each class symbol in turn.

See Also: obj-class.


objmessagebrk

objmessagebrk [<address>]

Examples:

"objmessagebrk MyObj"
break whenever a message is sent to MyObj
"objmessagebrk"
stop intercepting messages

Break whenever a message is sent to a particular object via ObjMessage.

See Also: objwatch, mwatch, procmessagebrk, pobject.

objwalk

objwalk [<address>]

Examples: "objwalk"

Prints out information about an object block.

See Also: lhwalk, pobject.

objwatch

objwatch [<address>]

Examples:

"objwatch ds:si"
watch the messages which reach the object at DS:SI
"objwatch MyObject"
watch the messages which reach MyObject
"objwatch"
Watch the messages which reach the process object.

Display message calls that have reached a particular object.

See Also: brk, mwatch, objmessagebrk, procmessagebrk, pobject.

omfq

omfq <message> <object> <args>* 

Examples:

"omfq MSG_META_QUIT *HelloApp"
Sends MSG_META_QUIT to the * HelloApp object.

Forces a message for an object onto its event queue.

See Also: call.

pappcache

pappcache

Examples:

"pappcache"
Print out current state of the app-cache

Prints out the current state of the system application cache, for systems operating in transparent launch mode.

Specifically, this command prints out:

patch

patch [<addr>]
patch del <addr>*

Patch assists in creating breakpoints that invisibly make small changes to code. This can help the programmer find several bugs without remaking and redownloading.

Patch Command Set

Form Meaning Example
<reg> = <value> assign value to regax = bx dl = 5
push <reg>|<value>push valuepush ax push 45
pop <reg>|<value>pop valuepop ax pop 45
poppop nothing (sp=sp+2)pop
jmp <address>change ipjmp UI_Attach+45
scall <address> <regs>call routine (save)scall MemLock ax = 3
mcall<address> <regs>call routine (modify)mcall MemLock ax = 3
xchg <reg> <reg>swap two registersxchg ax bx
set <flag>set condition flagset CF set ZF
reset <flag>reset condition flagreset CF reset ZF
if <flag>if flag set then ...if CF
if !<flag>if flag reset then ...if !ZF
if <expr>if expr then ...if foo == 4
else
endif
retmake function returnret
$terminate input
aabort
<other>tcl commandecho $foo

<flag> is taken from the set TF, IF, DF, OF, SF, ZF, PF, AF, CF and must be in upper-case.

The "scall" command has no effect on the current registers (not even for purposes of return values), while the "mcall" command changes whatever registers the function called modifies. See the "call" documentation for the format of <regs>.


patchin

Patchin undoes the work of patchout.

patchout

This command causes a RET to be placed at the start of a routine.

patient-default

patient-default [<geode-name>]

Examples:

"patient-default hello2"
Makes "hello2" the default patient.
"patient-default"
Prints the names of the current default patient.

Specifies the default patient. The send and run commands will use this as the default patient to operate on if none is passed to them.

pbitmap

pbitmap <address>

Print a bitmap graphically.

pcarray

pcarray [-eth] [<address>]

Examples:

"pcarray"
Print the chunk array at *DS:SI (header only)
"pcarray es:di"
Print the chunk array at ES:DI (header only)
"pcarray -e"
Print the chunk array at *DS:SI and print the elements in the array
"pcarray -tMyStruct"
Print the chunk array at *DS:SI and print the elements where the elements are of type MyStruct
"pcarry -tMyStruct -TMyExtraStruct"
Like above, but data after MyStruct is printed as an array of MyExtraStruct structures.
"pcarray -e3"
Print the chunk array at *DS:SI and print the third element
"pcarray -hMyHeader"
Print the chunk array at *DS:SI (header only) where the header is of type MyHeader

Print information about a chunk array.

pcbitmap

pcbitmap <address> <width> <height> [<no space flag>]

Examples:

"pcbitmap *ds:si 64 64 t"
print the bitmap without spaces

Print out a one-bit deep packbits-compacted bitmap.

See Also: pncbitmap.

pcelldata

pcelldata [<addr>]

Examples:

"pcelldata *es:di"
Print cell data for cell at *es:di.

Prints data for a spreadsheet data.

If no address is given, *es:di is used.

See Also: content, pcelldeps.

pcelldeps

pcelldeps <filehan> [<addr>]

Examples:

"pcelldeps 4be0h *es:di"
print dependencies of cell in file 4be0h.

Prints dependencies for a cell in the spreadsheet.

If no address is given, *es:di is used.

See Also: content, pcelldata.

pclass

pclass [<address>]

Examples:

"pclass"
prints the class of *DS:SI
"pclass ^l4ac0h:001eh"
Print the class of the object at the given address.

Print the object's class.

pdb

Produces useful information about a DBase block. For now, only information about the map block of the DBase file is produced. First arg H is the SIF_FILE or SIG_VM handle's ID. Second arg B is the VM block handle for which information is desired.

pdgroup

pdgroup [<flags>] [<patient>]

Examples:

"pdgroup"
Prints out all dgroup variables of the current patient
"pdgroup -e *lock*"
Prints out all dgroup variables matching expression "*lock*" of the current patient
"pdgroup term"
Prints out all dgroup variables of the patient "term"
"pdgroup -e *lock* term"
Prints out all dgroup variables matching expression "*lock*" of the patient "term"

Prints out the variables defined in dgroup.

See Also: print, pscope.


pdisk

pdisk <disk-handle>

Examples:

"pdisk 00a2h"
Prints information about the disk whose handle is 00a2h.

Prints out information about a registered disk, given its handle.

The Flags column is a string of single-character flags with the following meanings:

w
The disk is writable.
V
The disk is always valid, i.e. it's not removable.
S
The disk is stale. This is set if the drive for the disk has been deleted.
u
The disk is unnamed, so the system has made up a name for it.

See Also: diskwalk, drivewalk.

pdrive

pdrive <drive-handle>
pdrive <drive-name>
pdrive <drive-number>

Examples:

"pdrive si"
Print a description of the drive whose handle is in SI
"pdrive al"
Print a description of the drive whose number is in AL
"pdrive C"
Print a description of drive C

Provides the same information as "drivewalk," but for a single drive, given the offset to its DriveStatusEntry structure in the FSInfoResource.

This is intended for use by implementors of IFS drivers, as no one else is likely to ever see a drive handle.

See Also: drivewalk.

pdw

pdr <register pair>

Examples:

"pdw dxax"
"pdw dx.ax"
"pdw dx:ax"
Prints the dword value of register pair dx:ax

Prints the dword value of a register pair.

The first register is the high register while the second is the low register.

See Also: print.

penum

penum <type> <value>

Examples:

"penum FatalErrors 0"
print the first FatalErrors enumeration

Print an enumeration constant given a numerical value.

See Also: print, precord.

pevent

pevent <handle>

Examples:

"pevent 39a0h"
Print event with handle.

Print an event given its handle.

See Also: elist, eqlist, eqfind, erfind.

pflags

pflags

Prints the current machine flags (carry, zero, etc.).

See Also: setcc, getcc.

pfont

pfont [-c] [<address>]

Examples:

"pfont"
print bitmaps of the characters of the font in BX.
"pfont -c ^h1fd0h"
list the characters in the font at ^h1fd0h.

Print all the bitmaps of the characters in a font.

 

See Also: fonts, pusage, pfontinfo.

pfontinfo

pfontinfo <font ID>

Examples: "pfontinfo FID_BERKELEY"

Prints font header information for a font. Also lists all sizes built.

See Also: fonts, pfont.

pgen

pgen <element> [<object>]

Examples:

"pgen GI_states @65"
print the states of object 65
"pgen GI_visMoniker"
print the moniker of the object at *DS:SI
"pgen GI_states -i"
print the states of the object at the implied grab

Print an element of the generic instance data.

See Also: gentree, gup, pobject, piv, pvis.


pgs

pgs <address>

Examples:

"pgs"
List the graphics string at DS:SI
"pgs ^hdi"
Lift the graphics string whose handle is in DI, starting at the current position.
"pgs -s ^hdi"
List the graphics string whose handle is in DI, starting at the beginning of the graphics string.
"pgs -l3 ^hdi"
List three elements of the graphics string whose handle is in DI, starting at the current position.

List the contents of a graphics string.

See Also: pbitmap.

phandle

phandle <handle ID>

Examples:

"phandle 1a8ch"
print the handle 1a8ch

Print out a handle.

See Also: hwalk, lhwalk.

pharray

pharray [<flags>] [<vmfile> <dirblk>]

Examples:

"pharray"
Print the huge array at ^vbx:di (header only)
"pharray dx cx"
Print the huge array at ^vdx:cx (header only)
"pharray -e"
Print the huge array at ^vbx:di and print the elements in the array
"pharray -tMyStruct"
Print the huge array at ^vbx:di and print the elements where the elements are of type MyStruct
"pharray -e3"
Print the huge array at ^vbx:di and print the third element
"pharray -h"
Print the header of the HugeArray at ^vbx:di, using the default header type (HugeArrayDirectory).
"pharray -hMyHeader"
Print the huge array at ^vbx:di (header only) where the header is of type MyHeader
"pharray -d"
Print the directory elements of a HugeArray
"pharray -e5 -l8"
Print 8 HugeArray elements starting with number 5

Print information about a huge array.

pini

pini [<category>]

Examples:

"pini Lights Out"
Print out the contents of the Lights Out category in each .ini file
"pini"
Print out each currently loaded .ini file.

Provides you with the contents of the .ini files being used by the current GEOS session.

<category> may contain spaces and other such fun things. In fact, if you attempt to quote the argument (e.g. "pini {Lights Out}"), this will not find the category.


pinst

pinst [<address>]

Examples:

"pinst"
print the last master level of instance data of the object at *DS:SI
"pinst *MyObject"
print the last master level of instance data of MyObject.
"pinst -i"
print the last master level of the windowed object at the mouse pointer.

Print out all the instance data to the last level of the object.

See Also: pobject, piv.

piv

piv <master> <iv> [<address>]

Examples:

"piv Vis VCNI_viewHeight"
print Vis.VCNI_viewHeight at *DS:SI

This prints out the value of the instance variable specified.

See Also: pobject, pinst.

Prints a keyboard map in assembly-language format.

plines

plines <start> [<obj-address>]

Examples:

"plines 12"
Print lines starting at line 12.
"plines 12 ^l6340h:0020h"
Print lines starting at line 12 of object at given address.

Print information about the lines in a text object.

The printed line-starts are not correct.

See Also: ptext.

plist

Prints out a list of structures stored in an lmem chunk. It takes two arguments, the structure type that makes up the list, and the lmem handle of the chunk. e.g. plist FontsInUseEntry ds:di

pncbitmap

pncbitmap <address> <width> <height> [<no space flag>]

Examples:

"pncbitmap *ds:si 64 64 t"
print the bitmap without spaces

Print out a one-bitdeep noncompacted bitmap.

See Also: pcbitmap.

pnormal

pnormal [-v]

Examples:

"pnormal -v"
Print out verbose information about the current normal transfer item.

Prints out information about the current "normal" transfer item on the clipboard.

If you give the "-v" flag, this will print out the contents of the different transfer formats, rather than just an indication of their types.

See Also: pquick, print-clipboard-item.

pobjarray

pobjarray [<address>]

Examples:

"pobjarray"
Print the array of ODs at *ds:si.

Print out an array of objects.

See Also: pbody.

pobject

pobject [<address>] [<detail>]

Examples:

"pobj"
print the object at *ds:si from Gen down if Gen is one of its master levels; else, print all levels
"pobj *MyGenObject"
print MyGenObject from Gen down
"pobj Gen"
print the Gen level for the object at *ds:si
"pobj last"
print the last master level for the object at *ds:si
"pobj *MyObject"
all print all levels of MyObject
"pobj -i sketch"
print the master level headings of the windowed object at the mouse pointer
"pobj *MyObject FI_foo"
print the FI_foo instance variable for MyObject
"pobj HINT_FOO"
print the HINT_FOO variable data entry for the object at *ds:si
"pobj v"
print the variable data for the object at *ds:si

Print all or part of an object's instance and variable data.

See Also: pinst, piv, pvardata.


pobjmon

pobjmon [<address>] [<text only>]

Examples:

"pobjmon"
print the VisMoniker from the gentree object at *DS:SI

See Also: pvismon, pobject, vistree, gup, gentree, impliedgrab, systemobj.

pod

pod <address>

Examples:

"pod ds:si"

Print in output descriptor format (^l<handle>:<chunk>) the address passed.

The address argument is the address of an object.

ppath

ppath (current|docClip|winClip) [<gstate>]

Examples:

"ppath"
print the current path of the GState in ^hdi
"ppath docClip ^hgstate"
print the document clip path of the GState with handle gstate .
"ppath winClip ds"
print the window clip path of the GState in the DS register.

Print the structure of a path.

Unique abbreviations for the path to be printed are allowed.

pquick

pquick [-v]

Examples:

"pquick -v"
Print out verbose information about the current quick transfer item.

Prints out information about the current "quick" transfer item on the clipboard.

If you give the "-v" flag, this will print out the contents of the different transfer formats, rather than just an indication of their types.

See Also: pnormal, print-clipboard-item.

precord

precord <type> <value> [<silent>]

Examples:

"precord GSControl c0h"
print the GSControl record with the top two bits set

Print a record using a certain value.

See Also: print, penum.

preg

preg [-g] <addr>

Examples:

"preg *es:W_appReg"
Prints the application-defined clipping region for the window pointed to by es.
"preg -g ds:si"
Prints a "graphical" representation of the region beginning at ds:si

Decodes a graphics GEOS region and prints it out, either numerically, or as a series of x's and spaces.

print

print <expression>

Examples:

"print 56h"
print the constant 56h in various formats
"print ax - 10"
print ax less 10 decimal
"print ^l31a0h:001eh"
print the absolute address of the pointer

Print the value of an expression.

See Also: precord, penum, _print.


print-cell

print-cell [row column <cfp ds:si>]

Examples:

"print-cell 1 1"
print the cell <1,1>
"print-cell 1 2 *ds:si"
print the cell <1,2> given *DS:SI

Print information about a cell

See Also: print-row, print-row-block, print-cell-params, print-column-element.

print-cell-params

print-cell-params [<address>]

Examples:

"print-cell-params"
print the CellFunctionParameters at ds:si.
"print-cell-params ds:bx"
print the CellFunctionParameters at ds:bx.

Print a CellFunctionParameters block.

See Also: print-row, print-column-element, print-row-block, print-cell.

print-clipboard-item

print-clipboard-item [-v] <vmfile> <vmblock>
print-clipboard-item [-v] <memhandle>
print-clipboard-item [-v] <addr> 

Examples:

"print-clipboard-item bx"
Print out info about the transfer item whose memory handle is in the BX register.

Prints out information about a transfer item.

See Also: pnormal, pquick.

print-column-element

print-column-element [<address>]

Examples:

"print-column-element"
Print the ColumnArrayElement at ds:si.
"print-column-element ds:bx" print the ColumnArrayElement at ds:bx

Print a single ColumnArrayElement at a given address.

print-db-group

print-db-group file group

Examples:

"print-db-group ax bx"
print the group at bx/ax.

Print information about a dbase group block.

See Also: print-db-item.

print-db-item

print-db-item file group item

Examples:

"print-db-item bx ax di"
print the item at bx/ax/di

Print information about a single dbase item

See Also: print-db-group.

print-eval-dep-list

print-eval-dep-list [<addr>] 

Examples:

"print-eval-dep-list es:0"
Print dependency list at ES:0.

Prints a dependency list used for evaluation.

See Also: content, pcelldeps.

printNamesInObjTrees

var printNamesInObjTrees (0|1)

Examples:

"var printNamesInObjTrees 1"
Sets "gentree," "vistree," etc. commands to print object names (where available).

Determines whether object names are printed (where available) rather than class names when using the following commands: vistree, gentree, focus, target, model, mouse, keyboard.

The default value for this variable is zero.

See Also: gentree, vistree, focus, target, model, mouse, keyboard.

print-obj-and-method

print-obj-and-method <handle> <chunk> <message> [<cx> [<dx> 
                                                   [<bp> [<class>]]]] 

Examples:

"print-obj-and-method [read-reg bx] [read-reg si]"
Prints a description of the object ^lbx:si with the value stored and a hex representation.
"print-obj-and-method $h $c $m [read-reg cx] [read-reg dx] [read-reg bp]"
Prints a description of the object ^l$h:$c and the name of the message whose number is in $c. This is followed by the three words of data in cx, dx, and bp.

Prints a nicely formatted representation of an object, with option message, register data, label, hex address, & carriage return. The class indication may also be overriden.

See Also: mwatch, map-method, objwatch.


printRegions

var printRegions [(0|1)]

Examples:

"var printRegions 1"
If a structure contains a pointer to a region, "print" will attempt to determine its bounding box.

Controls whether "print" parses regions to find their bounding rectangle.

The default value for this variable is one.

See Also: print, condenseSpecial.

print-row

print-row [<address *DS:SI>]

Examples:

"print-row"
print the row at *DS:SI
"print-row ds:si"
print the row at DS:SI

Print a single row in the cell file given a pointer to the row.

See Also: print-column-element, print-cell-params, print-row-block, print-cell.

print-row-block

print-row-block [<address ds>]

Examples:

"print-row-block"
print the row-block at DS:0
"print-row-block es"
print the row-block at ES:0

Print a row-block.

See Also: print-row, print-cell-params, print-column-element, print-cell.

printStop

This variable controls how the current machine state is printed each time the machine comes to a complete stop. Possible values:

asm
Print the current assembly-language instruction, complete with the values for the instruction operands.
src
Print the current source line, if it's available. If the source line is not available, the current assembly-language instruction is displayed as above.
why
Print only the reason for the stopping, not the current machine state. "asm" and "src" modes also print this.
nil
Don't print anything.

procmessagebrk

procmessagebrk [<handle>]

Examples:

"procmessagebrk MyObj"
break whenever a message is sent to MyObj
"procmessagebrk"
stop intercepting messages

Break whenever a message is sent to a particular process via ObjMessage.

See Also: objwatch, mwatch, objmessagebrk, pobject.

ps

ps [<flags>]

Examples:

"ps -t"
list all threads in GEOS.

Print out GEOS' system status.

The flags argument may be one of the following:

-t
Prints out info on all threads. May be followed by a list of patients whose threads are to be displayed.
-p
Prints out info on all patients. May be followed by a list of patients to be displayed.
-h
Prints out info on all handles. May be followed by a list of patients whose handles are to be displayed.
The default is `-p'.

See Also: switch, sym-default.

pscope

pscope [<scope-name> [<sym-class>]]

Examples:

"pscope WinOpen"
Prints out all the local labels, variables, and arguments within the WinOpen() procedure

This prints out all the symbols contained in a particular scope.

See Also: whatis, locals.

psize

psize <structure>

Examples: "psize FontsInUseEntry"

Print the size of the passed structure.

pssheet

pssheet [-isSfrcvd] <address>

Examples:

"pssheet -s ^l3ce0h:001eh"
print style attributes.
"pssheet -f -i 94e5h:0057h"
print file info from instance data.

Prints out information about a spreadsheet object.

 

 pssheet <flags> [targetobj]

See Also: content, targetobj.

psup

psup [<object>]

Examples:

"psup"
print superclasses of object at *ds:si.
"psup -i"
print superclasses of object under mouse.
"psup ^l4e10h:20h"
print superclasses of object at ^l4e10h:20h.

Prints superclasses of an object.

If no object is specified, *ds:si is used.

See Also: is-obj-in-class.


ptext

ptext [<options>] <addr>

Examples:

"ptext"
Prints the text in the object for the method being executed in the current stack frame.

Prints out the text and related structures for a text object

The flag may be one or more of the following:

- c
Print out the char attr structures.
- e
Print out elements in addition to runs.
- f < field >
Print out given field of each element (default is Meta part).
- g
Print out graphics structures.
- l
Print out line and field structures.
- p
Print out para attr structures.
- r
Print out region attr structures.
- s
Print out style structures.
- t
Print out type structures.
- E
Limit printout to just the elements of whatever arrays are requeste. Do not attempt to print out associated text.
- N
Print out associated names.
- R
Print out full region descriptions.

pthread

pthread <id>

Examples:

"pthread 16c0h"
Prints information about the thread whose handle is 16c0h.

Provides various useful pieces of information about a particular thread including its current priority and its current registers.

<id> is the thread's handle ID, as obtained with the "ps -t" or "threadstat" command.

See Also: threadstat.

ptimer

ptimer <handle>

Examples:

"ptimer bx"
Print out information about the timer whose handle is in the BX register.

Prints out information about a timer registered with the system: when it will fire, what it will do when it fires, etc.

<handle> may be a variable, register, or constant.

See Also: twalk, phandle.

ptrans

ptrans [<flags>] [<address>]

Examples:

"ptrans"
print the normal transform for the object at *ds:si.
"ptrans -s"
print the sprite transform for the GrObj object at *ds:si.
"ptrans ^lbx:cx"
print the normal transform for the object whose OD is ^lbx:cx.

Prints the ObjectTransform data structure as specified.

See Also: pobject.

ptreg

ptreg <start> [<obj-addr>]

Examples:

"ptreg 12"
Print lines for region 12
"ptreg 12 ^lcx:dx"
Print lines for region 12 of object ^lcx:dx

Print information about the lines in a region.

See Also: ptext.

pusage

pusage [<address>]

Examples:

"pusage"
print the usage of characters in the font

List the characters in a font and when they were last used.

See Also: fonts, pfont, pfontinfo, plist.

pvardata

pvardata [<entry>]

Examples:

"pvardata ds:si"
Prints vardata of object at *ds:si
"pvardata -i"
Prints vardata of object with implied grab.

pvardentry

pvardentry <address> <object>

Examples:

"pvardentry ds:bx *ds:si"

pvis

pvis <element> [<object>]

Examples:

"pvis VI_bounds @65"
print the bounds of object 65
"pvis VI_optFlags"
print the flags of the object at *DS:SI
"pvis VI_attrs -i"
print the attributes of the object at the implied grab

Print an element of the visual instance data.

See Also: vistree, vup, pobject, piv, pgen.


pvismon

pvismon [<address>] [<text only>]

Examples:

"pvismon"
print the moniker at *DS:SI
"pvismon -i 1"
print a short description of the implied grab object.

Print a visual moniker structure at an absolute address.

See Also: pobjmon, pobject, vistree, gup, gentree, impliedgrab, systemobj.

pvmb

Prints out the VMBlockHandle for a VM block given the file handle H and the VM block handle B .

pvmt

pvmt [-p] [-a] [-s] [-c] (<handle> | <segment>)

Examples:

"pvmt bx"
Print out all used blocks for the open VM file whose file handle is in BX.
"pvmt -as ds"
Print out all blocks for the open VM file the segment of whose header block is in DS.

Prints out a map of the VM block handles for a VM file.

See Also: pgs.

pvsize

pvsize [<object>]

Examples:

"pvsize"
print the dimensions of the visual object at *ds:si.

Print out the dimensions of a visual object.

pwd

pwd

Examples: "pwd"

Prints the current working directory for the current thread.

See Also: dirs, stdpaths.

quit

quit [<options>]

Examples:

"quit cont"
continue GEOS and quit swat
"quit det"
detach from the PC and quit swat.

Stop the debugger and exit.

See Also: detach.

read-char

read-char [<echo>]

Examples:

"read-char 0"
Read a single character from the user and don't echo it.

Reads a character from the user.

If <echo> is non-zero or absent, the character typed will be echoed.

See Also: read-line.

read-line

read-line [<isTcl> [<initial input> [<special chars>]]]

Examples:

"read-line"
reads a single line of text.
"read-line 1"
reads a Tcl command.
"read-line 1 {go}"
reads a Tcl command that starts with "go "
"read-line 1 {} {\e\4}"
reads a Tcl command, considering escape and control-d cause for immediate return, regardless of whether braces and brackets are balanced

Reads a single line of input from the user. If optional argument is non-zero, the line is interpreted as a Tcl command and will not be returned until all braces/brackets are balanced. The final newline is stripped. Optional second argument is input to be placed in the buffer first. This input must also be on-screen following the prompt, else it will be lost.


read-reg

read-reg <register>

Examples:

"read-reg ax"
return the value of AX
"read-reg CC"
return the value of the conditional flags

Return the value of a register in decimal.

See Also: frame, assign, setcc, clrcc.

regs

regs

Print the current registers, flags, and instruction.

See Also: assign, setcc, clrcc, read-reg.

regwin

regwin [off]

Examples: "regwin"
"regwin off"

Turn the continuous display of registers on or off.

See Also: display.

repeatCommand

var repeatCommand <string>

Examples:

"var repeatCommand [list foo nil]"
Execute the command "foo nil" if the user just hits <Enter> at the next command prompt.

This variable holds the command Swat should execute if the user enters an empty command. It is used by all the memory-referencing commands to display the next chunk of memory, and can be used for other purposes as well.

See Also: target, focus, mouse, keyboard.

require

require <name> [<file>]

Examples:

"require fmtval print"
Ensure the procedure "fmtval" is defined, loading the file "print.tcl" if it is not.

This ensures that a particular function, not normally invoked by the user but present in some file in the system library, is actually loaded.

If no <file> is given, a file with the same name (possibly suffixed ".tcl") as the function is assumed.

See Also: autoload.

resize

resize <window> <numLines>

Examples:

"resize varwin 5"
Resizes the varwin to 5 lines.
"resize va 5"
Resizes the varwin to 5 lines.

Resizes the source window or a varwin or localwin.

restore-state

restore-state

Examples:

"restore-state"
Set all registers for the current thread to the values saved by the most recent save-state.

Pops all the registers for a thread from the internal state stack.

See Also: save-state.


ret

ret [<function name>]

Examples: "ret"
"ret ObjMessage"

Return from a function and stop.

See Also: finish, backtrace.

return-to-top-level

return-to-top-level

Examples:

"return-to-top-level"
Returns to the top-level interpreter.

Forces execution to return to the top-level interpreter loop, unwinding intermediate calls (protected commands still have their protected clauses executed, but nothing else is).

See Also: top-level, protect.

rs

rs

Examples:

"rs"
restart GEOS without attaching

Restart GEOS without attaching.

See Also: att, attach.

run

run [<patient-name>]

Examples:

"run uki"
Run the application with patient name "uki".
"run -e uki"
run EC Uki
"run -n uki"
run non-EC Uki
"run -p games\ukiec.geo "
run games\ukiec.geo
"run"
run the default patient, as specified by the patient-default command.

"Runs" an application by loading it via a call to UserLoadApplication() and stopping when the app reaches the GenProcess handler for MSG_META_ATTACH . Return patient created, if any (In the examples shown, this would be "uki").

See Also: patient-default, send, spawn, switch.

rwatch

rwatch [(on|off)]

Examples:

"rwatch on"
Watch text-recalculation as it happens
"rwatch off"
Turn output off
"rwatch"
See what the status is

Displays information about text recalculation. Specifically designed for tracking bugs in the rippling code.

See Also: ptext.

save

save (<#lines>|<filename>)

Examples:

"save 500"
Save the last 500 lines that scroll off the screen.
"save /dumps/puffball"
Save the contents of the entire scroll buffer to the file "puffball".

Controls the scrollback buffer Swat maintains for its main command window.

save-state

save-state

Examples:

"save-state"
Push the current register state onto the thread's state stack.

Records the state of the current thread (all its registers) for later restoration by "restore-state".

See Also: restore-state, discard-state.

sbwalk

sbwalk [<patient>]

Examples:

"sbwalk"
list the saved blocks of the current patient.
"sbwalk geos"
list the saved blocks of the GEOS patient.

List all the saved blocks in a patient.


scope

scope [<scope-name>]

Examples:

"scope"
Returns the name of the current auxiliary scope.

This changes the auxiliary scope in which Swat looks first when trying to resolve a symbol name in an address expression.

See Also: set-address, addr-parse, whatis.

screenwin

screenwin

Print the address of the current top-most screen window.

send

send [-enpr] <geode-name>

Examples:

"send icon"
send EC Icon Editor if running in EC mode; send non-EC Icon Editor if running in non-EC mode.
"send -r icon"
send appropriate icon editor, then run it. (See documentation for "run" above.)
"send -e icon"
send EC Icon editor.
"send -n icon"
send non-EC Icon Editor
"send -p c:/pcgeos/appl/icon/icon.geo"
send c:/pcgeos/appl/icon/icon.geo
"send"
send the default patient (as set by the patient-default command).

Send a geode from the host to target machine.

send-file

send-file <file> <targfilename>

Examples:

"send-file /pcgeos/appl/sdk/mess1/mess1.geo WORLD/soundapp.geo"
Send the mess1.geo file on the host machine to the WORLD directory of the host machine, where it will be called soundapp.geo .

Sends a file from the host machine to the target.

set-address

Set the last-accessed address recorded for memory-access commands. Single argument is an address expression to be used by the next memory-access command (except via <return>).

setcc

setcc <flag> [<value>]

Examples:

"setcc c"
set the carry flag
"setcc z 0"
clear the zero flag

Set a flag in the computer.

See Also: clrcc, compcc.

set-masks

set-masks <mask1> <mask2>

Examples:

"set-masks 0xff 0xff"
Allow no hardware interrupts to be handled while the machine is stopped.

Sets the interrupt masks used while the Swat stub is active. Users should use the "int" command.

See Also: int.

set-repeat

Sets the command to be repeated using a template string and the lastCommand variable. The variables $0...$n substitute the fields 0...n from the lastCommand variable. The final result is placed in repeatCommand which will be executed should the user type Enter.

set-startup-ec

set-startup-ec [<args>]

Examples:

"set-startup-ec +vm"
turn on VM error checking when starting up
"set-startup-ec none"
turn off all ec code when starting up

Executes the "ec" command upon startup, to allow one to override the default error checking flags.

See Also: ec.

sftwalk

sftwalk

Examples: "sftwalk"

Print the system file table out by blocks.

See Also: sysfiles, geosfiles, fwalk.


showcalls

showcalls [<flags>] [<args>]

Examples:

"showcalls -o"
show all calls using ObjMessage and ObjCall*
"showcalls -ml"
show all calls changing global and local memory
"showcalls"
stop showing any calls

Display calls to various parts of GEOS.

 

See Also: mwatch, objwatch.

showMethodNames

var showMethodNames

If this variable is non-zero, Swat prints out the names of the method in the AX register when unassembling a message call.

skip

skip [<number of instructions>]

Examples:

"skip"
skip the current instruction
"skip 6"
skip the next six instructions

Skip one or more instructions.

See Also: istep, sstep, patch.

sleep

sleep <seconds>

Examples:

"sleep 5"
Pauses Swat for 5 seconds.

This pauses Tcl execution for the given number of seconds, or until the user types Ctrl-C.

slist

slist [<args>]

Examples:

"slist"
list the current point of execution
"slist foo.asm::15"
list foo.asm at line 15
"slist foo.asm::15,45"
list foo.asm from lines 15 to 45

List source file lines in swat.

See Also: listi, istep, regs.


smatch

Look for symbols of a given class by pattern. First argument <pattern> is the pattern for which to search (it's a standard Swat pattern using shell wildcard characters). Optional second argument <class> is the class of symbol for which to search and is given directly to the "symbol match" command. Defaults to "any".

sort

sort [-r] [-n] [-u] <list>

Examples:

"sort -n $ids"
Sorts the list in $ids into ascending numeric order.

This sorts a list into ascending or descending order, lexicographically or numerically.

See Also: map, foreach, mapconcat.

spawn

spawn <processName> [<addr>]

Set a temporary breakpoint in a not-yet-existent process/thread, waiting for a new one to be created. First argument is the permanent name of the process to watch for. Second argument is an address expression specifying where to place the breakpoint. If no second argument is present, the machine will be stopped and Swat will return to the command level when the new thread is spawned by GEOS.

srcwin

srcwin <numLines>

Examples:

"srcwin 6"
Show 6 lines of source context around CS:IP
"srcwin 0"
Show no source lines, i.e. turn the display off.

Set the number of lines of source code to be displayed when the target machine stops.

See Also: display, regwin.

sstep

sstep [<default command>]

Examples:

"ss"
enter source step mode
"sstep n"
enter source step mode, <ret> does a next command

Step through the execution of the current patient by source lines. This is THE command for stepping through high-level (e.g., C) code.

See Also: istep, listi.


stdpaths

stdpaths

Examples: "stdpaths"

Print out all paths set for standard directories

See Also: pwd, dirs.

step

step

Examples:

"step"
execute the next instruction
"s"

Execute the patient by a single machine instruction.

See Also: istep, next.

step-patient

step-patient 

Examples:

"step-patient"
Execute a single instruction on the target PC.

Causes the PC to execute a single instruction, returning only when the instruction has been executed.

See Also: help-fetch.

step-until

step-until expression [byte|word]

Examples:

"step-until ax=0"
Single-step until ax is zero.
"step-until ds:20h!=0 byte"
Single-step until byte at ds:20h is non-zero
"step-until ds:20h!=0 word"
Single-step until word at ds:20h is non-zero
"step-until c=0"
Single-step until the carry is clear
"step-until ax!=ax"
Step forever

This command causes Swat to step until a condition is met.

Useful for tracking memory or register trashing bugs.

stop

stop in <class>::<message> [if <expr>]
stop in <procedure> [if <expr>]
stop in <address-history-token> [if <expr>]
stop at [<file>:]<line> [if <expr>]
stop <address> [if <expr>]

Examples: "stop in main"
"stop in @3"
"stop at /staff/pcgeos/Loader/main.asm:36 if { joe_local ==22}"
"stop at 25"
"stop MemAlloc+3 if {ax==3}"

Specify a place and condition at which the machine should stop executing. This command is intended primarily for setting breakpoints when debugging a geode created in C or another high-level language, but may also be used when debugging assembly-language geodes.

See Also: brk, ibrk.

stop-catch

stop-catch <body>

Examples:

"stop-catch {go ProcCallModuleRoutine}"
Let machine run until it reaches ProcCallModuleRoutine() , but do not issue a FULLSTOP event when it gets there.

Allows a string of commands to execute without a FULLSTOP event being generated while they execute.

A number of things happen when a FULLSTOP event is dispatched, including notifying the user where the machine stopped. This is inappropriate in something like "istep" or "cycles" that is single-stepping the machine, for example.

See Also: event, continue-patient, step-patient.

stop-patient

stop-patient

Examples:

"stop-patient"
Stops the target PC.

Stops the target PC, in case you continued it and didn't wait for it to stop on its own.

This is different from the "stop" subcommand of the "patient" command.

See Also: continue-patient.


stream

stream open <file> (r|w|a|r+|w+)
stream read (line|list|char) <stream>
stream print <list> <stream>
stream write <string> <stream>
stream rewind <stream>
stream seek (<posn>|+<incr>|-<decr>|end) <stream>
stream state <stream>
stream eof <stream>
stream close <stream>
stream flush <stream>
stream watch <stream> <what> <procName>
stream ignore <stream>

Examples:

"var s [stream open kmap.def w]"
Open the file "kmap.def" for writing, creating it if it wasn't there before, and truncating any existing file.
"stream write $line $s"
Write the string in $line to the open stream.

This allows you to read, write, create, and otherwise manipulate files on the host machine from Swat.

See Also: protect, source, file.

switch

switch <thread-id>
switch [<patient>] [:<thread-num>]

Examples:

"switch 3730h"
Switches swat's current thread to be the one whose handle ID is 3730h.
"switch :1"
Switches Swat's current thread to be thread number 1 for the current patient.
"switch parallel:2"
Switches Swat's current thread to be thread number 2 for the patient "parallel"
"switch write"
Switches Swat's current thread to be thread number 0 (the process thread) for the patient "write"
"switch"
Switches Swat's current thread to be the current thread on the PC.

Switches between applications/threads.


symbolCompletion

var symbolCompletion [(0|1)]

Examples:

"var symbolCompletion 1"
Enable symbol completion in the top-level command reader.

This variable controls whether you can ask Swat to complete a symbol for you while you're typing a command. Completion is currently very slow and resource-intensive, so you probably don't want to enable it.

sym-default

sym-default [<name>]

Examples:

"sym-default motif"
Make swat look for any unknown symbols in the patient named "motif" once all other usual places have been searched.

Specifies an additional place to search for symbols when all the usual places have been searched to no avail.

sysfiles

sysfiles

Examples:

"sysfiles"
Print out all open files from dos's system file table.

Normally SFT entries that aren't in-use aren't printed. If you give the optional argument "all", however, all SFT entries, including those that aren't in-use, will be printed.

See Also: geosfiles, sftwalk, fwalk.

systemobj

systemobj

Examples:

"gentree [systemobj]"
print the generic tree starting at the system's root
"pobject [systemobj]"
print the system object

Prints out the address of the uiSystemObj, which is the top level of the generic tree.

See Also: gentree, impliedgrab.

target

target [<object>]

Examples:

"target"
print target hierarchy from the system object down
"target -i"
print target hierarchy from implied grab down
"target ^l4e10h:20h"
print target hierarchy from ^l4e10h:20h down
"target [content]"
print target hierarchy from content under mouse.

Prints the target hierarchy below an object.

See Also: focus, model, mouse, keyboard, pobject.

targetobj

targetobj

Examples:

"targetobj"
return object with target
"pobj [targetobj]"
do a pobject on the target object (equivalent to "pobj -t").

Returns the object with the target.

See Also: target, focus, focusobj, modelobj.

tbrk

tbrk <addr> <condition>*
tbrk del <tbrk>+
tbrk list
tbrk cond <tbrk> <condition>*
tbrk count <tbrk>
tbrk reset <tbrk>
tbrk address <tbrk>

Examples:

"tbrk ObjCallMethodTable"
Count the number of times ObjCallMethodTable() is called.
"tbrk count 2"
Find the number of times tally breakpoint number 2 was hit.
"tbrk reset 2"
Reset the counter for tbrk number 2 to 0.
"tbrk list"
Print a list of the set tally breakpoints and their current counts.

This command manipulates breakpoints that tally the number of times they are hit without stopping execution of the machine--the breakpoint is noted and the machine is immediately continued. Such a breakpoint allows for real-time performance analysis, which is nice.

See Also: brk, cbrk.

tcl-debug

tcl-debug top 
tcl-debug next <tcl-frame>
tcl-debug prev <tcl-frame>
tcl-debug args <tcl-frame>
tcl-debug getf <tcl-frame>
tcl-debug setf <tcl-frame> <flags>
tcl-debug eval <tcl-frame> <expr>
tcl-debug complete <tcl-frame>
tcl-debug next-call 

Examples:

"var f [tcl-debug top]"
Sets $f to be the frame at which the debugger was entered.
"var f [tcl-debug next $f]"
Retrieves the next frame down (away from the top) the Tcl call stack from $f.

This provides access to the internals of the Tcl interpreter for the Tcl debugger (which is written in Tcl, not C). It will not function except after the debugger has been entered.

See Also: debug.


text-fixup

  1. Run geos under swat, run swat on the development system
  2. Run GeoWrite
  3. Open the GeoWrite file that needs fixing
  4. Set the breakpoint in swat:
  5.  patch text::CalculateRegions
     => text-fixup

    This will set a breakpoint at the right spot

  6. Turn on the error-checking code in swat:
  7.  ec +text 
  8. Enter a <space> into the document. This forces recalculation which will cause CalculateRegions() to be called which will cause text-fixup to be called.
  9. If it worked, this code should patch together the file. If it's not, you'll get a FatalError right now.

  10. Turn off the ec code and disable the fixup breakpoint.
  11.  ec none
     dis <breakpoint number>
     continue 
  12. Delete the space and save the file.

To do another file, you can just enable the breakpoint once the new file is open and turn on the ec code.

Helps fix up trashed GeoWrite documents.

thaw

thaw [<patient>]
thaw :<n>
thaw <patient>:<n>
thaw <id>

Examples:

"thaw"
Thaw the current thread.
"thaw term"
Allows the application thread for "term" to run normally
"thaw :1"
Allows thread #1 of the current patient to run normally
"thaw 16c0h"
Allows the thread whose handle is 16c0h to run normally.

Thawing a thread restores its priority to what it was before the thread was frozen.

See Also: freeze.

threadname

threadname <id>

Examples:

"threadname 21c0h"
Returns the name of the thread whose handle id is 21c0h.

Given a thread handle, produces the name of the thread, in the form <patient>:<n>

If the handle is not one of those swat knows to be for a thread, this returns the string "unknown."

See Also: thread, patient.

threadstat

threadstat

Examples:

"threadstat"

Provides information about all threads and various thread queues and synchronization points in the system.

See Also: ps.

timebrk

timebrk <start-addr> <end-addr>+
 timebrk del <timebrk>+
 timebrk list
 timebrk time <timebrk>
 timebrk reset <timebrk>

Examples:

"timebrk LoadResourceData -f"
Calculate the time required to process a call to LoadResourceData() .
"timebrk time 2"
Find the amount of time accumulated for timing breakpoint number 2.
"timebrk reset 2"
Reset the counter for timebrk number two to zero.
"timebrk list"
Print a list of the set timing breakpoints and their current counts and time.

This command manipulates breakpoints that calculate the amount of time executing between their starting point and a specified ending point. The breakpoints also record the number of times their start is hit, so you can figure the average amount of time per hit.

See Also: brk, cbrk, tbrk.

timingProcessor

var timingProcessor [i86|i88|i286|V20]

The processor for which to generate cycle counts.

See Also: cycles.

tmem

tmem

Examples:

"tmem"
turn on memory tracing.

Trace memory usage.

The tmem command catches calls to DebugMemory, printing out the parameters passed (move, free, realloc, discard, swapout, swapin, modify).

top-level

top-level

Examples:

"top-level"
Begin reading and interpreting Tcl commands in a nested interpreter.

This is the top-most read-eval-print loop of the Swat Tcl interpreter.

This command will only return if the user issues the "break" command. Otherwise it loops infinitely, reading and executing and printing the results of Tcl commands.

tundocalls

tundocalls [-acPCrR]

Examples:

"tundocalls -a" Print out all text undo calls
"tundocalls -r" Print run undo calls
"tundocalls -R" Print replace undo calls
"tundocalls -c" Print info when undo information is created
"tundocalls -cP" Print info about para attributes only
"tundocalls -cC" Print info about char attributes only
"tundocalls"

Prints out information about each undo call made to the text object.

See Also: ptext, showcalls.


twalk

twalk

Examples:

"twalk"
print all the timers in the system.
"twalk -o ui"
print all the timers in the system for the ui thread.
"twalk -a"
print all the timers with the "real" data for the time for time remaining rather than maintaining a total.

List all the timers in GEOS.

unalias

unalias <name>+

Examples:

"unalias p"
Removes "p" as an alias for print.

This removes an alias.

See Also: alias.

unassemble

unassemble [<addr> [<decode-args>]]

Examples:

"unassemble cs:ip 1"
Disassemble the instruction at CS:IP and return a string that shows the values of the arguments involved.

This decodes data as machine instructions and returns them to you to display as you like. It is not usually typed from the command line.

See Also: listi.

unbind-key

unbind-key <ascii_value>

Examples:

"unbind-key \321"
Unbinds scroll-down key on host machine.

Unbinds the passed ASCII value.

See Also: alias, bind-key, get-key-binding.

undebug

undebug <proc-name>+

Examples:

"undebug fooproc"
Cease halting execution each time "fooproc" is executing.

Removes a Tcl breakpoint set by a previous "debug" command.

See Also: debug.

up

up [<frame offset>]

Examples:

"up"
move the frame one frame up the stack
"up 4"
move the frame four frames up the stack

Move the frame up the stack.

See Also: backtrace, down.

value

value fetch <addr> [<type>]
value store <addr> <value> [<type>]
value hfetch <num>
value hstore <addr-list>
value hset <number-saved>
value log <addr> <stream> [<type>]

Examples:

"value fetch ds:si [type word]"
Fetch a word from ds:si
"value store ds:si 0 [type word]"
Store 0 to the word at ds:si
"value hfetch 36"
Fetch the 36th address list stored in the value history.
"value hstore $a"
Store the address list in $a into the value history.
"value hset 50"
Keep track of up to 50 address lists in the value history.
"value log ds:si $s [type word]"
Fetch a word from ds:si and dump the binary data to stream $s.

This command allows you to fetch and alter values in the target PC. It is also the maintainer of the value history, which you normally access via @<number> terms in address expressions.

See Also: addr-parse, assign, field.


varwin

varwin <num-lines> <var-name> 

view

view [<args>]

Examples:

"view foo.goc"
Bring up foo.goc in the source window.

View a file in Swat.

See Also: view-default, srcwin.

view-default

view-default [patient]

Examples:

"view-default spool"
sets the default view to the spool patient.
"view-default"
turns off the view default.

If the view-default is set the view command will automatically look for source files from that patient. If it's not set then the view command will look for files from the current patient.

See Also: view, srcwin.

vistree

vistree [<address>] [<instance field>]

Examples:

"vistree"
print the visual tree starting at *DS:SI
"vistree -i"
print the visual tree under the mouse
"vistree @23 VI_optFlags"
print the visual tree with opt flags
"vistree *uiSystemObj"
starts the visual tree at the root of the system.

Print out a visual tree.

See Also: vup, gentree, impliedgrab, pobject.

vup

vup [<address>] [<instance field>]

Examples:

"vup"
print the visual object at *DS:SI and its ancestors
"vup @23 VI_optFlags"
print the states of object @23 and its ancestors
"vup -i"
print the visual object under the mouse and the object's ancestors

Print a list of the object and all of its visual ancestors.

See Also: vistree, gup, gentree, impliedgrab, pobject.

wait

wait

Examples:

"wait"
Wait for the target PC to halt.

This is used after the machine has been continued with "continue-patient" to wait for the machine to stop again. Its use is usually hidden by calling "cont" or "next".

See Also: brk, ibrk.

waitForPatient

var waitForPatient [(1|0)]

Examples:

"var waitForPatient 0"
Tells Swat to return to the command prompt after continuing the machine.

Determines whether the command-level patient-continuation commands (step, next, and cont, for example) will wait for the machine to stop before returning.

See Also: step, next, cont, int.

wakeup

Wait for a given patient/thread to wake up. WHO is of the same form as the argument to the "switch" command, ("help switch" to find out more). Leaves you stopped in the kernel in the desired thread's context unless something else causes the machine to stop before the patient/thread wakes up. WHO defaults to the current thread.

wakeup-thread

Subroutine to actually wake up a thread. Argument WHO is as for the "switch"command. Returns non-zero if the wakeup was successful and zero if the machine stopped for some other reason.


wclear

wclear

Clears the current window.

wcreate

wcreate <height>

Create a window of the given height and return a token for it. The window is placed just above the command window, if there's room. If there aren't that many lines free on the screen, an error is returned.

wdelete

wdelete <window>

Delete the given window. All windows below it move up and the command window enlarges.

whatat

whatat [<address>]

Examples:

"whatat"
name of variable at *DS:SI
"whatat ^l2ef0h:002ah"
name of variable at the specified address

Print the name of the variable at the address.

See Also: pobject, hwalk, lhwalk.

whatis

whatis (<symbol>|<addr>)

Examples: "whatis WinColorFlags"

This produces a human-readable description of a symbol, giving whatever information is pertinent to its type.

why

why

Examples: "why"

Print a description of why the system crashed.

See Also: regs, backtrace, explain.

wintree

wintree <window handle> [<data field>]

Examples:

"wintree ^hd060h"
print a window tree starting at the handle d060h

Print a window tree starting with the root specified.

See Also: vistree, gentree.

winverse

winverse

Sets the inverse-mode of the current window (whether newly-echoed characters are displayed in inverse video) on or off, depending on its argument (1 is on).

wmove

wmove [(+|-)] <x-coord> [(+|-)] <y-coord>

Moves the cursor for the current window. Takes two arguments: the new x position and the new y position. These positions may be absolute or relative (absolute positions begin with + or -). If you attempt to move outside the current window, an error is generated. This command returns the new cursor position as { x y }.

words

words [<address>] [<length>]

Examples:

"words"
lists 8 words at DS:SI
"words ds:di 16"
lists 16 words starting at DS:DI

Examine memory as a dump of words.

See Also: bytes, dwords, imem, assign.

wpop

wpop

Revert the current window to its previously pushed value.

wpush

wpush <window>

Switch to a new window, saving the old current-window. Use wpop to go back to the previous window. All I/O goes through the current window.

wrefresh

wrefresh

Synchronizes the current window with the screen. This need only be performed if you don't echo a newline, as echoing a newline refreshes the current window.

wtop

wtop <flag>

Sets where windows go. If argument is non-zero, windows go at the top of the screen and work down. Else windows go at the bottom of the screen and work up


This document is a single-page version of a a multi-page document, suitable for easy printing.