INtime SDK Help
vs (SDM)

Displays current information about the stack and system calls on the stack.

vs [count]

Parameters

count
A decimal or hexadecimal value for the number of words from the stack to display. A suffix of T, as in 16T, means decimal. No suffix or a suffix of H indicates hexadecimal.

By default, the number of words in the display depends on the number of parameters for the system call at the CS:EIP. When CS:EIP is not pointing to a system call, the entire contents of the stack display.

Remarks

If the stack does not contain a system call, the display is either the number of stack elements you specify or all the stack contents, whichever is least. If a parameter is a string, the string is displayed.

The current SS:ESP registers are used to display the current stack values. The current CS:EIP is used for system call and parameter information. To change the CS:EIP value, use the monitor's g or x command.

If the current instruction is not a CALL instruction, the contents of the stack are displayed without a message. If the instruction is a CALL but not a system call, the stack contents are displayed with a message that the call is not a system call.

The gate number is displayed if the call is a C Library call.

This is the display format for system call information:

gate #NNNN
xxxx:xxxxxxxx   xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx
xxxx:xxxxxxxx   xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx
xxxx:xxxxxxxx   xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx
 (subsystem) system call
|parameters|

The fields in the display are:

gate #NNNN
The gate number associated with the system call.
xxxx:xxxxxxxx
The contents of the SS:ESP (stack memory addresses).
xxxxxxxx
Values now on the stack. The number of stack values varies with the number of system call parameters and whether the code being debugged is 16- or 32-bits.
(subsystem)
The INtime kernel layer for the system call.
system call
The name of the INtime software system call.
Parameters
The parameter names that correspond to the stack values directly above them. The maximum parameters displayed are 24.

Examples

  1. To display stack information, enter:

    The following stack information displays:

    gate #0158
    1df3:00409fdc     000000c8   00401230    00001000  00000000   00409ffc   00401036
    1df3:00409ff4     00000001   00404004    00000fe4  00000000   00000000   00000000
    (INtime) CreateRtThread 
                   |..Priority..|..Entry..|..StackSz..|..Param..|
    

    In this display, the CALL instruction has a stack address 1908:000007ca. The parameter names identify the stack values directly above them. That is, the excep$p parameter name signifies that the first two words represent a pointer (1980:00000b08) to the exception code. Similarly, the mbox parameter signifies that the third word (1ea8) is the handle for the mailbox being deleted.

  2. For system calls that are not INtime software system calls, SDM displays a stack display and a message that the CALL instruction is not for an INtime software system call.

    This display is for a 32-bit application:

    1df3:00409fe8    00403034    00409ffc    00401036    00000001    00404004    00000fe4
    
    Not a system CALL
    
  3. If a call has more parameters than will fit on one line of the display, SDM automatically displays multiple lines of stack values. Corresponding multiple lines of parameter descriptions display directly below the stack values.

    This display is stack information for CreateRtThread in a 32-bit application:

    gate #0158
    1df3:00409fdc     000000c8   00401230    00001000  00000000   00409ffc   00401036
    1df3:00409ff4     00000001   00404004    00000fe4  00000000   00000000   00000000
    (INtime) CreateRtThread 
                   |..Priority..|..Entry..|..StackSz..|..Param..|
    

    This display indicates that the CALL instruction is CreateRtThread with 4 parameters. The names of these parameters are shown between the vertical bars (|). The words on the stack correspond to the parameters directly below them.

Error Messages

Syntax Error
You made an error entering the command.
Not a system CALL
The CS:EIP is pointing to a CALL instruction that is not an INtime software system call.

See Also

Debugging tools, g, x, CreateRtThread