DkmStackFrame Class

Definition

DkmStackFrame represents a frame on the call stack after filtering and translation.

public ref class DkmStackFrame : Microsoft::VisualStudio::Debugger::CallStack::DkmStackWalkFrame
[Windows::Foundation::Metadata::WebHostHidden]
public ref class DkmStackFrame : Microsoft::VisualStudio::Debugger::CallStack::DkmStackWalkFrame
[Windows::Foundation::Metadata::WebHostHidden]
class DkmStackFrame : Microsoft::VisualStudio::Debugger::CallStack::DkmStackWalkFrame
[System.Runtime.InteropServices.Guid("9e32fe11-196e-a0ec-b83c-0792427e91a2")]
public class DkmStackFrame : Microsoft.VisualStudio.Debugger.CallStack.DkmStackWalkFrame
[<System.Runtime.InteropServices.Guid("9e32fe11-196e-a0ec-b83c-0792427e91a2")>]
type DkmStackFrame = class
    inherit DkmStackWalkFrame
Public Class DkmStackFrame
Inherits DkmStackWalkFrame
Inheritance
DkmStackFrame
Attributes

Properties

AnnotatedModule

[Optional] If we have an annotated frame, specifies an optional module instance to associate with this frame. If present, the user will be able to load binaries or symbols for this module by right-clicking on this frame in the call stack window. This is NULL for non-annotated frames.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

(Inherited from DkmStackWalkFrame)
Annotations

[Optional] A read only collection of stack frame annotations. These are defined by an unwinder and are specific to that unwinder. An example usage is how inline frame data is passed from inline stack filter to the formatter.

(Inherited from DkmStackWalkFrame)
AsyncContext

[Optional] Optional context for walking async return stacks and task creation stacks.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

(Inherited from DkmStackWalkFrame)
BasicSymbolInfo

[Optional] Contains basic info about the DkmInstructionSymbol corresponding to the frame's InstructionAddress. For native frames, this will be computed by the StackProvider before the frame is passed to a stack filter.

This will always be null for a DkmStackFrame.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

(Inherited from DkmStackWalkFrame)
CompilerId

LanguageId/VendorId for the compiler which produced the code for this stack frame. If this is unknown (ex: no symbols loaded for this module), both values will be Guid.Empty. Otherwise, both values should be non-zero.

Connection

This represents a connection between the monitor and the IDE. It can either be a local connection if the monitor is running in the same process as the IDE, or it can be a remote connection. In the monitor process, there is only one connection.

(Inherited from DkmStackWalkFrame)
Data

[Optional] Optional object to attach to a DkmStackWalkFrame, allowing components to associate additional private data with the frame.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

(Inherited from DkmStackWalkFrame)
Description

[Optional] Description of the frame which will be displayed in the call stack window. This should be provided for annotated frames.

(Inherited from DkmStackWalkFrame)
Flags

Flags properties of a DkmStackWalkFrame.

(Inherited from DkmStackWalkFrame)
FrameBase

Base stack pointer of the frame. This is used by the SDM to sort the frame, and it is used by the stack merger to assess walk progress, so this value is required even for annotated frames. This value should only be invalid in the case that the debuggee's stack is corrupt.

(Inherited from DkmStackWalkFrame)
FrameName

Name of the stack frame. DkmStackFrame.FormatOptions determines the format of the function name.

FrameSize

Number of bytes of the stack consumed by this frame. This value will be zero for annotated frames, or if the value is unknown.

(Inherited from DkmStackWalkFrame)
InstructionAddress

[Optional] The instruction of this frame. This can be omitted for annotated frames.

(Inherited from DkmStackWalkFrame)
IsStale

Specifies if this stack frame is stale or not after an Edit and Continue.

This API was introduced in Visual Studio 15 Update 6 (DkmApiVersion.VS15Update6).

ModuleInstance

[Optional] The module containing this address. Addresses without a module cannot have symbols (even for custom addresses). CLR addresses will always have a module. Native addresses will not have a module if either the CPU jumped to an invalid address (ex: NULL), or if the CPU is executing dynamically-emitted code.

(Inherited from DkmStackWalkFrame)
Options

Collection of settings that affect how the stack provider formats a DkmStackFrame.

Priority

The priority of the stack walk frame. This is typically used for annotated frames that have detected a problem.

This API was introduced in Visual Studio 17 Update 5 (DkmApiVersion.VS17Update5).

(Inherited from DkmStackWalkFrame)
Process

DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

(Inherited from DkmStackWalkFrame)
Registers

[Optional] Registers of the walked frame. These should be provided for non-annotated frames.

(Inherited from DkmStackWalkFrame)
ReturnType

[Optional] Name of the stack frame's return type. This is only provided when DkmFrameNameFormatOptions.ReturnTypeField is set.

RuntimeInstance

[Optional] The DkmRuntimeInstance class represents an execution environment which is loaded into a DkmProcess and which contains code to be debugged.

(Inherited from DkmStackWalkFrame)
SourcePosition

[Optional] Source code location for this stack frame. This is only provided when DkmFrameNameFormatOptions.DocumentPositionField is set.

Thread

The thread that this stack frame is on.

(Inherited from DkmStackWalkFrame)
UniqueId

A unique identifier for the DkmStackWalkFrame. In remote debugging scenarios, this may be GUID_NULL/Guid.Empty if the frame was marshalled from an older IDE/Remote Debugger.

This API was introduced in Visual Studio 16 Update 10 (DkmApiVersion.VS16Update10).

(Inherited from DkmStackWalkFrame)

Methods

CanSetNextStatement(DkmInstructionAddress)

CanSetNextStatement determines if it is possible to move the IP of a stack frame. The stack frame is always the leaf stack frame on a particular thread. This API may only be implemented within the engine process. The Result out parameter should be S_OK or the value of a failed HRESULT that the UI can map to an error message.

Location constraint: API must be called from an IDE component (component level > 100,000).

(Inherited from DkmStackWalkFrame)
ComputeUserStatus(DkmInspectionSession, Boolean)

Determines whether or not a frame is user code.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

(Inherited from DkmStackWalkFrame)
Create(DkmStackWalkFrame, DkmFrameFormatOptions, DkmCompilerId, String, String, DkmSourcePosition)

Create a new DkmStackFrame object instance.

Location constraint: API must be called from an IDE component (component level > 100,000).

Create(DkmStackWalkFrame, DkmFrameFormatOptions, DkmCompilerId, String, String, DkmSourcePosition, Boolean)

Create a new DkmStackFrame object instance.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 15 Update 6 (DkmApiVersion.VS15Update6).

ExtractFromAD7Object(IDebugStackFrame2)

Obtains a DkmStackFrame from an AD7 stack frame object. This API is used by Visual Studio packages or addins which wish to access the Concord API to obtain more detailed information about the debugged process. This API will only function correctly from the main thread of Visual Studio.

ExtractFromDTEObject(StackFrame)

Obtains a DkmStackFrame from a DTE (debugger automation) stack frame object. This API is used by Visual Studio packages or addins which wish to access the Concord API to obtain more detailed information about the debugged process. The automation object is often obtained from the 'OnContextChanged' automation event, or from the Debugger.CurrentStackFrame property. This API will only function correctly from the main thread of Visual Studio.

Format(DkmInspectionSession, DkmFrameFormatOptions)

Format a DkmStackWalkFrame into a DkmStackFrame. Formatting a frame is one step of what the stack provider does during GetNextFrames. This method can be used to format a frame in a different way than was originally performed by the stack provider in GetNextFrames.

Location constraint: API must be called from an IDE component (component level > 100,000).

(Inherited from DkmStackWalkFrame)
GetClrGenericParameters()

Gets the generic parameters for the current stack frame as a list of assembly qualified names.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

(Inherited from DkmStackWalkFrame)
GetClrGenericParameters(DkmWorkList, DkmCompletionRoutine<DkmGetClrGenericParametersAsyncResult>)

Gets the generic parameters for the current stack frame as a list of assembly qualified names.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

(Inherited from DkmStackWalkFrame)
GetEffectiveAddresses(DkmInstructionAddress)

A method that calculates and returns the effective addresses for the requested address. The effective address is the calculated address that an instruction operand represents. For instance, on x86, an instruction may be of the form dwordptr [esp-12]. The effective address of this operand will be the result of subtracting 12 from esp. The number of operands and effective addresses are architecture specific.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetInspectionInterface(DkmInspectionSession, Guid)

GetInspectionInterface is used to obtain a ICorDebugFrame or other implementation-specific interfaces which a component can use to deeply inspect the stack frame.

The returned interface may ONLY be used to inspect the target process, and should NEVER be used to control execution (no stepping, no breakpoints, no continue, etc). Doing so is unsupported and will result in undefined behavior. NOTE: Using this method from managed code is not recommended for performance reasons. Marshalling of DkmStackWalkFrame between native and managed code is expensive. Use DkmRuntimeInstance.GetFrameInspectionInterface instead.

Location constraint: This API must be called from the same process where the target runtime implements stack walk, or where symbols are loaded. For managed debugging, this means that when debugging 64-bit or remote processes, this API must be called from a debug monitor component.

(Inherited from DkmStackWalkFrame)
GetInstructionSymbol()

Return a DkmInstructionSymbol for a stack frame. If the stack frame has no instruction address (annotated frame) or the instruction address has no associated DkmModule, then GetInstructionSymbol will return null (S_FALSE in native code).

(Inherited from DkmStackWalkFrame)
GetProperty(ICorDebugValue, String)

Evaluates a property on the given ICorDebugValue. The value's type must be loaded by the DkmClrAppDomain of the DkmStackWalkFrame that this $Name$ is being called on.

Location constraint: This must be on the remote side because we are passing an ICorDebugHandleValue.

This API was introduced in Visual Studio 15 Update 3 (DkmApiVersion.VS15Update3).

(Inherited from DkmStackWalkFrame)
GetUnwindAddress(DkmInstructionAddress)

Returns the address that represents the location if an exception were to be intercepted to this frame.

(Inherited from DkmStackWalkFrame)
InterceptCurrentException(DkmExceptionInterceptActionFlags, UInt64)

InterceptCurrentException is used to unwind to this frame as if there was an exception handler at that frame.

(Inherited from DkmStackWalkFrame)
OnSetNextStatementCompleted(DkmInstructionAddress)

OnSetNextStatementCompleted is a general purpose method to allow components to clear state after a set next statement completed. The DkmStackWalkFrame will be the frame prior to to the SetNextStatement call.

Location constraint: This API should generally be called only from client-side components. However, it is safe for a monitor-side component to call this API if the set next statement is being called from an event handler.

(Inherited from DkmStackWalkFrame)
SetNextStatement(DkmInstructionAddress)

SetNextStatement moves the IP of a stack frame. The stack frame is always the leaf stack frame on a particular thread.

(Inherited from DkmStackWalkFrame)

Applies to