Compartilhar via


DkmStackContext Class

Definition

DkmStackContext objects are created by components that wish to request the stack from the stack provider. A component needs to close the context after they have completed the stack walk. To obtain the stack a component should create this object and then call GetNextFrames.

Derived classes: DkmStackTraceContext

public ref class DkmStackContext : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("90f8ca28-617f-0b13-f421-fa6f1159973e")]
public class DkmStackContext : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("90f8ca28-617f-0b13-f421-fa6f1159973e")>]
type DkmStackContext = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmStackContext
Inherits DkmDataContainer
Implements IDisposable
Inheritance
Inheritance
DkmStackContext
Derived
Attributes
Implements

Properties

AsyncContext

[Optional] If we are fetching the continuation frames or task creation frames, specifies the context for the async stack walk operation.

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

FilterOptions

Options for how the call stack should be filtered.

FormatOptions

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

InspectionSession

DkmInspectionSession allows the various components which inspect data to store private data which is associated with a group of evaluations.

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)
Operation

Which type of stack walk we are doing. If the operation is AsyncReturnStackWalk or AsyncTaskCreationStackWalk, "Task" must be non-null. Otherwise, "AsyncContext" must be NULL.

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

Thread

DkmThread represents a thread running in the target process.

ThreadContext

[Optional] The initial thread 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).

UniqueId

Guid which uniquely identifies this DkmStackContext.

Methods

Close()

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

DkmStackContext objects are automatically closed when their associated DkmInspectionSession object is closed.

This method may only be called by the component which created the object.

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

Create(DkmInspectionSession, DkmThread, DkmCallStackFilterOptions, DkmFrameFormatOptions, ReadOnlyCollection<Byte>, DkmAsyncStackWalkContext, DkmStackWalkOperation, DkmDataItem)

Create a new DkmStackContext object instance. The caller is responsible for closing the created object after they are done.

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).

Create(DkmInspectionSession, DkmThread, DkmCallStackFilterOptions, DkmFrameFormatOptions, ReadOnlyCollection<Byte>, DkmDataItem)

Create a new DkmStackContext object instance. The caller is responsible for closing the created object after they are done.

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

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)
GetNextFrames(DkmWorkList, Int32, DkmCompletionRoutine<DkmGetNextFramesAsyncResult>)

Obtain the next frames from the call stack. If this is the first call on a particular DkmStackContext then this will return the first frames. This method is the recommended way to obtain the call stack because the stack provider maintains a cache of the physical stack.

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.

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

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)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)

Explicit Interface Implementations

IDisposable.Dispose()

To be added.

Applies to