Skip to content

Latest commit

 

History

History
136 lines (88 loc) · 5.13 KB

nf-dbgeng-idebugcontrol5-getcontextstacktraceex.md

File metadata and controls

136 lines (88 loc) · 5.13 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:dbgeng.IDebugControl5.GetContextStackTraceEx
IDebugControl5::GetContextStackTraceEx (dbgeng.h)
The GetContextStackTraceEx method returns the frames at the top of the call stack, starting with an arbitrary register context and returning the reconstructed register context for each stack frame.
debugger\idebugcontrol5_getcontextstacktraceex.htm
debugger
05/03/2018
IDebugControl5::GetContextStackTraceEx
GetContextStackTraceEx, GetContextStackTraceEx method [Windows Debugging], GetContextStackTraceEx method [Windows Debugging],IDebugControl5 interface, IDebugControl5 interface [Windows Debugging],GetContextStackTraceEx method, IDebugControl5.GetContextStackTraceEx, IDebugControl5::GetContextStackTraceEx, dbgeng/IDebugControl5::GetContextStackTraceEx, debugger.idebugcontrol5_getcontextstacktraceex
dbgeng.h
Dbgeng.h, Ntddk.h
Desktop
Windows
IDebugControl5::GetContextStackTraceEx
dbgeng/IDebugControl5::GetContextStackTraceEx
APIRef
kbSyntax
COM
dbgeng.h
IDebugControl5::GetContextStackTraceEx

IDebugControl5::GetContextStackTraceEx

-description

The GetContextStackTraceEx method returns the frames at the top of the call stack, starting with an arbitrary register context and returning the reconstructed register context for each stack frame. The GetContextStackTraceEx method provides inline frame support. For more information about working with inline functions, see Debugging Optimized Code and Inline Functions.

-parameters

-param StartContext [in, optional]

Specifies the register context for the top of the stack.

-param StartContextSize [in]

Specifies the size, in bytes, of the StartContext register context.

-param Frames [out, optional]

Receives the stack frames. The number of elements this array holds is FrameSize. If Frames is NULL, this information is not returned.

-param FramesSize [in]

Specifies the number of items in the array Frames.

-param FrameContexts [out, optional]

Receives the reconstructed register context for each frame in the stack. The entries in this array correspond to the entries in the Frames array. The type of the thread context is the CONTEXT structure for the target's effective processor. If FrameContexts is NULL, this information is not returned.

-param FrameContextsSize [in]

Specifies the size, in bytes, of the memory pointed to by FrameContexts. The number of stack frames returned equals the number of contexts returned, and FrameContextsSize must equal FramesSize times FrameContextsEntrySize.

-param FrameContextsEntrySize [in]

Specifies the size, in bytes, of each frame context in FrameContexts.

-param FramesFilled [out, optional]

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

-returns

Return code Description
S_OK
The method was successful.
 

This method can also return error values. For more information, see Return Values.

-remarks

The stack trace returned to Frames and FrameContexts can be printed using OutputContextStackTraceEx.

It is common for stack unwinds to restore only a subset of the registers. For example, stack unwinds will not always restore the volatile register state because the volatile registers are scratch registers and code does not need to preserve them. Registers that are not restored on unwind are left as the last value restored, so care should be taken when using the register state that might not be restored by an unwind.

-see-also

GetStackTraceEx

IDebugControl5

OutputContextStackTraceEx

k, kb, kc, kd, kp, kP, kv (Display Stack Backtrace)