Platform SDK: Debugging and Error Handling

STACKFRAME

The STACKFRAME structure represents a stack frame.

typedef struct _tagSTACKFRAME {
    ADDRESS AddrPC;
    ADDRESS AddrReturn;
    ADDRESS AddrFrame;
    ADDRESS AddrStack;
    PVOID   FuncTableEntry;
    DWORD   Params[4];
    BOOL    Far;
    BOOL    Virtual;
    DWORD   Reserved[3];
    KDHELP  KdHelp;
    ADDRESS AddrBStore;
} STACKFRAME, *LPSTACKFRAME;

Win64: This structure is defined as follows.

typedef struct _tagSTACKFRAME64 {
    ADDRESS64 AddrPC;
    ADDRESS64 AddrReturn;
    ADDRESS64 AddrFrame;
    ADDRESS64 AddrStack;
    ADDRESS64 AddrBStore;
    PVOID     FuncTableEntry;
    DWORD64   Params[4];
    BOOL      Far;
    BOOL      Virtual;
    DWORD64   Reserved[3];
    KDHELP64  KdHelp;
} STACKFRAME64, *LPSTACKFRAME64;

Members

AddrPC
An ADDRESS structure that specifies the program counter (EIP).
AddrReturn
An ADDRESS structure that specifies the return address.
AddrFrame
An ADDRESS structure that specifies the frame pointer (ESP).

On Alpha computers, there is no frame register, so the Offset member is not used and should be zero. However, the Offset member is used when walking a kernel stack which terminates in an exception frame. This is a special case.

AddrStack
An ADDRESS structure that specifies the stack pointer (ESP).
FuncTableEntry
On x86 computers, this member is an FPO_DATA structure. On Alpha computers, this member is an IMAGE_FUNCTION_ENTRY structure. If there is no function table entry, this member is NULL.
Params
The possible arguments to the function.
Far
This member is TRUE if this is a WOW far call.
Virtual
This member is TRUE if this is a virtual frame.
Reserved
Used internally by the StackWalk function.
KdHelp
A KDHELP structure that specifies helper data for walking kernel callback frames.
AddrBStore
An ADDRESS structure that specifies the backing store.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Dbghelp.h.

See Also

Debug Help Library Overview, DbgHelp Structures, ADDRESS, FPO_DATA, IMAGE_FUNCTION_ENTRY, KDHELP, StackWalk