DkmStackWalkContext Class

Definition

DkmStackWalkContext allows the various components which walk, filter, or examine call stacks to store private data which is associated with this call stack.

public ref class DkmStackWalkContext : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("33ebb282-734b-c2f3-66cd-c42eb8a3d490")]
public class DkmStackWalkContext : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("33ebb282-734b-c2f3-66cd-c42eb8a3d490")>]
type DkmStackWalkContext = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmStackWalkContext
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmStackWalkContext
Attributes
Implements

Properties

Flags
IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
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.

Thread

DkmThread represents a thread running in the target process.

ThreadContext

[Optional] The initial Win32 CONTEXT to use when performing the stack walk. This value is normally 'null' but can be set in order to view another call stack (ex: .cxr).

TopStackPointer

Stack pointer for the top stack frame.

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

UniqueId

Guid which uniquely identifies this DkmStackWalkContext.

Methods

Close()

Closes a DkmStackWalkContext object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmStackWalkContext objects are automatically closed when their associated DkmThread object is closed.

Create(DkmThread, ReadOnlyCollection<Byte>, DkmDataItem)

Create a new DkmStackWalkContext object instance.

Create(DkmThread, ReadOnlyCollection<Byte>, UInt64, DkmDataItem)

Create a new DkmStackWalkContext object instance.

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

Create(DkmThread, ReadOnlyCollection<Byte>, UInt64, DkmStackWalkContextFlags, DkmDataItem)
FindSymbolStackWalkContext(Guid)

Find a DkmSymbolStackWalkContext element within this DkmStackWalkContext. If no element with the given input key is present, FindSymbolStackWalkContext will fail.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
HeuristicWalkFrames(DkmFrameRegisters, UInt32, UInt64, DkmFrameRegisters, Boolean)

Attempt to walk through a region of the stack using a heuristic stack walk algorithm. This is used in x86 when no symbols are available. It is not implemented on other platforms as PDATA allows walking of all frames.

HeuristicWalkFrames(DkmWorkList, DkmFrameRegisters, UInt32, UInt64, DkmCompletionRoutine<DkmHeuristicWalkFramesAsyncResult>)

Attempt to walk through a region of the stack using a heuristic stack walk algorithm. This is used in x86 when no symbols are available. It is not implemented on other platforms as PDATA allows walking of all frames.

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.

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
RuntimeWalkNextFrames(DkmWorkList, UInt32, DkmCompletionRoutine<DkmRuntimeWalkNextFramesAsyncResult>)

Attempt to walk the stack without the use of symbols. This will call into various components that know how to walk portions of the stack (ex: CLR frames will be walked by the CLR debug monitor). An 'unresolved' frame will be left for portions of the stack which cannot be walked without information stored within the symbol file. These 'unresolved' frames have no InstructionAddress or Description.

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.

RuntimeWalkNextFrames(UInt32, Boolean)

Attempt to walk the stack without the use of symbols. This will call into various components that know how to walk portions of the stack (ex: CLR frames will be walked by the CLR debug monitor). An 'unresolved' frame will be left for portions of the stack which cannot be walked without information stored within the symbol file. These 'unresolved' frames have no InstructionAddress or Description.

RuntimeWalkNextFramesAndCheckCache(DkmWorkList, UInt32, UInt32, DkmStackHash, DkmCompletionRoutine<DkmRuntimeWalkNextFramesAndCheckCacheAsyncResult>)

Deprecated. Do not use this method, it returns out-dated hash values; use IDkmMergedMonitorStackWalk164::RuntimeWalkNextFramesAndCheckCache164 instead. Version of RuntimeWalkNextFrames() that also checks if a cached copy of the call stack is still valid.

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.

RuntimeWalkNextFramesAndCheckCache(UInt32, UInt32, DkmStackHash, Boolean, DkmStackHash, DkmStackWalkContext, Boolean)

Deprecated. Do not use this method, it returns out-dated hash values; use IDkmMergedMonitorStackWalk164::RuntimeWalkNextFramesAndCheckCache164 instead. Version of RuntimeWalkNextFrames() that also checks if a cached copy of the call stack is still valid.

RuntimeWalkNextFramesAndCheckCache164(DkmWorkList, UInt32, UInt32, DkmStackHash164, DkmCompletionRoutine<DkmRuntimeWalkNextFramesAndCheckCache164AsyncResult>)

Version of RuntimeWalkNextFrames() that also checks if a cached copy of the call stack is still valid.

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 16 Update 4 (DkmApiVersion.VS16Update4).

RuntimeWalkNextFramesAndCheckCache164(UInt32, UInt32, DkmStackHash164, Boolean, DkmStackHash164, DkmStackWalkContext, Boolean)

Version of RuntimeWalkNextFrames() that also checks if a cached copy of the call stack is still valid.

This API was introduced in Visual Studio 16 Update 4 (DkmApiVersion.VS16Update4).

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)

Explicit Interface Implementations

IDisposable.Dispose()

Applies to