PWINDBG_STACKTRACE_ROUTINE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdbgexts.h

PWINDBG_STACKTRACE_ROUTINE PwindbgStacktraceRoutine;

ULONG PwindbgStacktraceRoutine(
  [in]  ULONG FramePointer,
  [in]  ULONG StackPointer,
  [in]  ULONG ProgramCounter,
  [out] PEXTSTACKTRACE StackFrames,
  [in]  ULONG Frames
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdbgexts-pwindbg_stacktrace_routine)

PWINDBG_STACKTRACE_ROUTINE callback function

Description

The PWINDBG_STACKTRACE_ROUTINE (StackTrace) function retrieves a stack trace for the process being debugged. Returns the number of frames read into the buffer pointed to by StackFrames.

Parameters

FramePointer [in]

Specifies the frame pointer. If no specific value is desired, this should simply be set to zero.

StackPointer [in]

Specifies the stack pointer. If no specific value is desired, this should simply be set to zero.

ProgramCounter [in]

Specifies the instruction pointer. If no specific value is desired, this should simply be set to zero.

StackFrames [out]

Receives the stack information. StackFrames must be a pointer to a buffer that is large enough to hold the number of stack frames specified by Frames. The stack frames are stored in the following data structure:

typedef struct _tagEXTSTACKTRACE {
    ULONG       FramePointer;
    ULONG       ProgramCounter;
    ULONG       ReturnAddress;
    ULONG       Args[4];
} EXTSTACKTRACE, *PEXTSTACKTRACE;

Frames [in]

Specifies the maximum number of frames that will fit into the buffer.

Return value

The actual number of frames written to the buffer pointed to by StackFrames.

Remarks

For a WdbgExts extension, include Wdbgexts.h. For

a DbgEng extension, include Wdbgexts.h before

Dbgeng.h. See Writing DbgEng Extension Code for

details.