A number of arithmetic, bitwise, and logical functions are
available. The precedence of evaluation is similar to that of the C
programming language. Here they are, listed in order of
precedence:
Data Display
D |
Display next screen of data. |
D addr |
Data display. |
D- |
Data display back one page. |
Dx addr |
Data type
(B = Byte,
W = Word,
D = Dword,
V = Vector,
G = GDT,
I = IDT,
T = TSS,
T2 = 286 TSS,
T3 = 386 TSS).
|
Dx addr
P |
Data display as physical data (say in ROM which has been
mapped over by 386MAX).
|
Dx addr
Pexp |
Data display using exp as CR3 - this is useful when debugging VCPI
clients because they use a separate
CR3. |
All data display commands may be followed by an
optional width switch (e.g., DW/5 which
displays the data at five words per line instead of the usual eight).
The data width switch must be placed between the data command and
its arguments (if any) as in DW/5 DS:0. |
Register Operations
R reg[=]exp |
Set register reg to exp. Valid registers include
all GP and EGP as well as
FL,
EFL,
CRn,
DRn,
TRn,
TR, and
LDTR.
There are two ways to crash the system via this command: setting
CR3 to a bad value, or setting EFL with a bad value for the VM
or IOPL flags. The code which sets CR0 forces the Page Enable
and Protect Enable bits on (as evidenced by typing
R CR0=0), so experiment with setting
CR0 without fear. Use the
pseudo-register names CSIP
or CSEIP to set both registers
to an address. |
R reg.str[=]exp |
This command also supports bit mask qualifiers on registers.
For example, to set the AM bit in CR0, type R CR0.AM=1. See Register Mask Values for a complete list
of mask values supported. |
RC |
Clear saved register state so another RS
may execute. |
RR |
Restore saved registers. |
RS |
Save registers to restore later via RR.
Only one RS may be executed at a time without
either restoring the state via RR or clearing
the state via RC. |
The search results are displayed on a separate screen which may be made
active at other times by pressing F6. Only the
first 23 matches are displayed. In a future release the Up, Down, Page
Up, and Page Down keys will allow scrolling through successive matches.
Symbolic Debugging (see SWATSYM.DOC for
details)
CD [d:][path]
CHDIR [d:][path] |
Change the current directory to path. If no argument, display the current
drive/directory. |
FS |
Flush symbol table. |
LF filename |
Load file into browser. |
LI + |
Enable line number display in disassembly screen. |
LI - |
Disable line number display. |
LI dddd |
Go to line dddd (decimal) in file browser. |
LI dddd+ |
Go to line dddd forward from current line. |
LI dddd- |
Go to line dddd back from current line. |
LS filename |
Load symbol file. |
LS filename exp |
Load symbol file and add 16-bit value to all VM segments. |
PATH d:\dir1[,d:\dir2[,...]] |
Set source file search path. |
PATH+ d:\dira[,d:\dirb[,...]] |
Add to source file search path. |
PS r |
Set range of symbol proximity searches to r. |
PS r g |
Set range r and granularity g
(1=bytes,
2=words,
4=dwords) of symbol proximity searches. |
QS addr |
Display the symbol which is nearest to (and below) the given address. |
SB+ |
Enable source browser mode. |
SB- |
Disable source browser mode. |
SB*+ |
Enable source browser mode but disregard module names. |
TS |
Force all symbols to be retranslated according to current GDT and LDT. |
TS sel |
Retranslates only for selector/segment sel. |
TS * ID |
Retranslates for all selectors/segments with ID specified. |
TS sel ID |
Retranslates only for selector/segment sel with ID specified. |
TS *|sel *|IDv|p |
Change to specified mode for selector and/or ID specified. |
TS *|sel *|ID
*|v|p
nsel |
Replace segment/selector and mode for specified selectors and IDs.
If * is specified for mode, the mode is left
alone. |
TS *|sel *|ID
*|v|p
nsel+ |
nsel is added to all specified segments. |
Remote debugging (see SWATREM.DOC)
APPKEY |
Edit application keystroke buffer. This is primarily useful for remote
debugging. If an application is waiting for a keystroke, this feature allows
you to send one to the application, as well as to view any that may already
be available. |
CHAT |
Enter CHAT mode (also via Ctl-F8). |
SETCOM port bps |
Initialize specified serial port for communications. See
SETCOM= profile option for full
syntax. |
SETCOM |
Reinitialize the serial port with values last specified by
SETCOM or
SETCOM=. This is useful when an
application has reprogrammed the UART. |
SETCOM - |
Ignore all activity on serial port. Use this if you are done with remote
debugging and wish an application to have access to the serial port. When
386SWAT is using the serial port, no serial port interrupts will be visible
to virtual mode programs. |
SETCOM RTS+ |
Pull RTS (Request To Send) line high. |
SETCOM RTS- |
Drop RTS (Request To Send) line low. |
SETCOM DTR+ |
Pull DTR (Data Terminal Ready) line high. |
SETCOM DTR- |
Drop DTR (Data Terminal Ready) line low. This is one way to hang up
a modem that won't respond to (wait)+++
(wait)ATH(ENTER). |
REMDBG |
Attempt to establish remote debugging session (also via Ctl-F9). See the section below on remote
debugging. |
Windows Debugging Commands (see WINKDBG.DOC)
IPF [/d] [/s] [/r] expr |
If Invalid Page Faults are being trapped by 386SWAT's VxD
(see SWATVXD.DOC for more details), use the
IPF command to control how these events are to be handled. The
optional switch /d tells 386SWAT not
to display a message on the mono screen describing this event,
/s tells 386SWAT not to stop when this
event occurs, /r tells 386SWAT to
remove this entry from its local tables, and expr is an
expression which evaulates to a linear address corresponding to
the Invalid Page Fault. |
MDB expr |
Display the memory which corresponds to the selector expr as
a Module Database. |
SGH [/b|/s|/h|/o] [/c] expr |
Search through the Windows Global Heap for values. The expression
(expr) entered is interpreted as a base address if /b
is specified, size if /s, handle if /h,
and owner if /h. If /c
is specified, the search continues from the currently displayed entry;
otherwise, the search starts at the top of the heap. |
TDB expr |
Display the memory which corresponds to the selector expr as
a Task Database. |
WKD [ON|OFF] |
Turn ON or OFF
Kernel Debugging. This command cannot be used from within Windows. |
WKD [QUIET|NOISY] |
Disable (QUIET) or Enable
(NOISY) reports on Parameter Errors. |
WKD LOGERROR [ON|OFF] |
Turn ON or OFF
the INT 01h trap of calls to LogError (). |
WKD FAULT [ON|OFF|SKIP] |
Turn ON, OFF,
or SKIP once traps for Faults. |