|
GEOS SDK TechDocs
|
|
flagwin ...
|
func ...
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.
-
Subcommands may be abbreviated uniquely.
-
Stack decoding works by a heuristic method, rather than relying on the presence of a created stack frame pointed to by BP in each function. Because of this, it can occasionally get confused.
-
Frame tokens are valid only while the target machine is stopped and are invalidated when it is continued.
-
Each frame records the address on the stack where each register was most-recently pushed (i.e. by the frame closest to it on the way toward the top of the stack). Register pushes are looked for only at the start of a function in what can be considered the function prologue.
-
"frame register" and "frame setreg" allow you to get or set the value held in a register in the given frame. For "setreg", <value> is a standard address expression, only the offset of which is used to set the register.
-
"frame register" returns all registers but "pc" as a decimal number. "pc" is formatted as two hex numbers (each preceded by "0x") separated by a colon.
-
"frame info" prints out information on where the register values for "frame register" and "frame setreg" are coming from/going to for the given or currently-selected frame. Because of the speed that can be gained by only pushing registers when you absolutely have to, there are many functions in GEOS that do not push the registers they save at their start, so Swat does not notice that they are actually saved. It is good to make sure a register value is coming from a reliable source before deciding your program has a bug simply because the value returned by "frame register" is invalid.
-
For any subcommand where the <frame> token is optional, the currently- selected frame will be used if you give no token.
-
"frame cur" returns the token for the currently-selected stack frame.
-
"frame set" is what sets the current frame, when set by a Tcl procedure.
-
"frame +<number>" selects the frame <number> frames up the stack (away from the top) from the current frame. "frame -<number>" goes the other way.
-
"frame <number>" selects the frame with the given number, where the top-most frame is considered frame number 1 and numbers count up from there.
-
"frame funcsym" returns the symbol token for the function active in the given (or current) frame. If no known function is active, you get "nil".
-
"frame scope" returns the full name of the scope that is active in the given (or current) frame. This will be different from the function if, for example, one is in the middle of an "if" that contains variables that are local to it only.
-
"frame function" returns the name of the function active in the given (or current) frame. If no known function is active, you get the CS:IP for the frame, formatted as two hex numbers separated by a colon.
-
"frame patient" returns the token for the patient that owns the function in which the frame is executing.
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.
-
Only one frame window can be active at a time.
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.
-
A frozen thread is not dead in the water, as it will still run if nothing else is runnable.
-
Freezing a thread is most useful when debugging multi-threaded applications where a bug appears to be caused by a timing problem or race condition between the two threads. Freezing one of the threads ensures a consistent timing relationship between the two threads and allows the bug to be reproduced much more easily.
-
The freezing of a thread is accomplished by setting its base and current priorities to as high a number as possible (255) thereby making the thread the least-favored thread in the system. The previous priority can be restored using the "thaw" command.
See Also: thaw.
fullscreen
fullscreen
Examples:
-
"fullscreen"
Prints the full screen hierarchy from the system object down.
|
GEOS SDK TechDocs
|
|
flagwin ...
|
func ...