IDebugControl::GetStackTrace method (dbgeng.h)
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, writes] PDEBUG_STACK_FRAME Frames,
[in] ULONG FramesSize,
[out, optional] PULONG FramesFilled
);
Parameters
[in] FrameOffset
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.
[in] StackOffset
Specifies the location of the current stack. If StackOffset is set to zero, the current stack pointer is used instead.
[in] InstructionOffset
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.
[out, writes] Frames
Receives the stack frames. The number of elements this array holds is FrameSize.
[in] FramesSize
Specifies the number of items in the Frames array.
[out, optional] FramesFilled
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 code | Description |
---|---|
|
The method was successful. |
|
No stack frames were returned. |
Remarks
The stack trace returned to Frames can be printed using OutputStackTrace.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dbgeng.h (include Dbgeng.h) |