Expand Minimize

IDebugControl::GetStackTrace method

The GetStackTrace method returns the frames at the top of the specified call stack.

Syntax


HRESULT GetStackTrace(
  [in]             ULONG64            FrameOffset,
  [in]             ULONG64            StackOffset,
  [in]             ULONG64            InstructionOffset,
  [out]            PDEBUG_STACK_FRAME Frames,
  [in]             ULONG              FrameSize,
  [out, optional]  PULONG             FramesFilled
);

Parameters

FrameOffset [in]

Specifies the location of the stack frame at the top of the stack. If FrameOffset is set to zero, the current frame pointer is used instead.

StackOffset [in]

Specifies the location of the current stack. If StackOffset is set to zero, the current stack pointer is used instead.

InstructionOffset [in]

Specifies the location of the instruction of interest for the function that is represented by the stack frame at the top of the stack. If InstructionOffset is set to zero, the current instruction is used instead.

Frames [out]

Receives the stack frames. The number of elements this array holds is FrameSize.

FrameSize [in]

Specifies the number of items in the Frames array.

FramesFilled [out, optional]

Receives the number of frames that were placed in the array Frames. If FramesFilled is NULL, this information is not returned.

Return value

This method may also return other error values. See Return Values for more details.

Return codeDescription
S_OK

The method was successful.

E_FAIL

No stack frames were returned.

 

Remarks

The stack trace returned to Frames can be printed using OutputStackTrace.

Requirements

Target platform

Desktop

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugControl
IDebugControl2
IDebugControl3
GetContextStackTrace
GetFrameOffset2
GetInstructionOffset2
GetStackOffset2
OutputStackTrace
k, kb, kc, kd, kp, kP, kv (Display Stack Backtrace)
StackTrace

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft