DkmClrNcInstructionAddress Class

Definition

DkmClrNcInstructionAddress is used to represent an addresses in native-compiled CLR code. It contains the information about where the instruction is using both managed concepts (DkmClrNcModuleInstance, method token, IL offset) and native concepts ( DkmClrNcContainerModuleInstance, RVA).

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

public ref class DkmClrNcInstructionAddress : Microsoft::VisualStudio::Debugger::Clr::DkmClrInstructionAddress
[Windows::Foundation::Metadata::WebHostHidden]
public ref class DkmClrNcInstructionAddress : Microsoft::VisualStudio::Debugger::Clr::DkmClrInstructionAddress
[Windows::Foundation::Metadata::WebHostHidden]
class DkmClrNcInstructionAddress : Microsoft::VisualStudio::Debugger::Clr::DkmClrInstructionAddress
[System.Runtime.InteropServices.Guid("377ece5a-e9ff-bb6a-1612-b5d9cc54755f")]
public class DkmClrNcInstructionAddress : Microsoft.VisualStudio.Debugger.Clr.DkmClrInstructionAddress
[<System.Runtime.InteropServices.Guid("377ece5a-e9ff-bb6a-1612-b5d9cc54755f")>]
type DkmClrNcInstructionAddress = class
    inherit DkmClrInstructionAddress
Public Class DkmClrNcInstructionAddress
Inherits DkmClrInstructionAddress
Inheritance
Attributes

Properties

ContainerModule

The underlying container module (on-disk module) where this address is loaded. Symbols (DkmModule) are accessed through this module instead of 'ModuleInstance'.

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

CPUInstructionPart

[Optional] CPUInstructionPart provides the address that the CPU will execute. This is always provided for native instructions. It may be provided for CLR or custom addresses depending on how the address object was created.

(Inherited from DkmInstructionAddress)
GenericParameters

[Optional] For generic methods, this provides the ECMA formatted TypeSpec signature for each generic parameter. For non-generic methods, this will be null. For non-merged modules this is relative to the mapping (or pseudo-IL assembly).

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

ILOffset

ILOffset is the index of the IL instruction that this address represents. This value may be set to UInt32.MaxValue for an instruction that is within the given method, but not tied to a particular IL instruction. This is used for CLR native instructions that don't map to an IL instruction. (ICorDebugILFrame::GetIP indicates MAPPING_UNMAPPED_ADDRESS).

(Inherited from DkmClrInstructionAddress)
MethodId

The version/token pair for this method.

(Inherited from DkmClrInstructionAddress)
ModuleInstance

The managed module containing the InstructionPointer.

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

NativeOffset

For the standard .NET Framework, NativeOffset is a byte offset relative to start of the method where the CPU instruction can be found. For the purpose of this value, the method should be treated as a contiguous block of bytes. If the method has not been Just-in-time compiled or if this address is being used to refer purely to the IL address, NativeOffset will be set to UInt32.MaxValue.

For native-compiled .NET Framework modules, this value is the RVA of the native instruction in the module.

(Inherited from DkmClrInstructionAddress)
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 DkmInstructionAddress)
ReferenceToken

[Optional] In a multi-module assembly, MethodId.Token is a method token resolved to the appropriate virtual module. This token is can be looked up in the pseudo- assembly.

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

RuntimeInstance

Represents a native-compiled CLR instance running in a target process.

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

TagValue

DkmInstructionAddress is an abstract base class. This enum indicates which derived class this object is an instance of.

(Inherited from DkmInstructionAddress)

Methods

CompareTo(DkmInstructionAddress)

Compares two instruction addresses and returns a value indicating whether one is less than, equal to, or greater than the other. The addresses must be from the same module.

(Inherited from DkmInstructionAddress)
Create(DkmClrMethodId, UInt32, UInt32, DkmClrNcRuntimeInstance, DkmClrNcModuleInstance, DkmClrNcContainerModuleInstance, ReadOnlyCollection<Byte>, Int32, DkmInstructionAddress+CPUInstruction)

Create a new DkmClrNcInstructionAddress object instance.

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

DecodeAsyncStateMachineAttribute() (Inherited from DkmClrInstructionAddress)
GetCorFunction()

Provides direct access to the ICorDebugFunction object, which expression evaluators or other components can use to inspect the app domain.

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.

Location constraint: API must be called from a Monitor component (component level < 100,000).

(Inherited from DkmClrInstructionAddress)
GetCurrentCPUAddress()

Resolves a DkmInstructionAddress to a CPU InstructionAddress. This is the reverse mapping of ResolveCPUInstructionAddress. This API is currently only supported by CLR DkmRuntimeInstance objects.

Location constraint: This API should generally be called on the client, but it can be called on the server for translating CLR addresses (but not native-compiled).

(Inherited from DkmInstructionAddress)
GetCurrentCPUAddress(DkmWorkList, DkmCompletionRoutine<DkmGetCurrentCPUAddressAsyncResult>)

Resolves a DkmInstructionAddress to a CPU InstructionAddress. This is the reverse mapping of ResolveCPUInstructionAddress. This API is currently only supported by CLR DkmRuntimeInstance objects.

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: This API should generally be called on the client, but it can be called on the server for translating CLR addresses (but not native-compiled).

(Inherited from DkmInstructionAddress)
GetNativeCodeMap(DkmStackWalkFrame)

Provides the map of how this method was compiled to native code.

(Inherited from DkmClrInstructionAddress)
GetNonUserCodeMetadataFlags()

Obtains non user code status for this instruction address.

(Inherited from DkmClrInstructionAddress)
GetNonUserCodeMetadataFlags(DkmWorkList, DkmCompletionRoutine<DkmGetNonUserCodeMetadataFlagsAsyncResult>)

Obtains non user code status for this instruction address.

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.

(Inherited from DkmClrInstructionAddress)
GetSymbol()

Convert a DkmInstructionAddress into a DkmInstructionSymbol. If the DkmInstructionAddress is not in a DkmModule then GetSymbol will return null (S_FALSE in native code).

(Inherited from DkmInstructionAddress)
IsInSameFunction(DkmInstructionAddress)

Compares two instruction addresses and determines if they are within the same function.

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

(Inherited from DkmInstructionAddress)
IsUserCode(DkmWorkList, DkmCompletionRoutine<DkmIsUserCodeAsyncResult>)

Determines if a given instruction address is user code or not.

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: Note: with Visual Studio 2017 Update 8, the CallDirection of the API was made 'Bidirectional' from 'Normal' and can now be called from any component.

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

(Inherited from DkmInstructionAddress)
IsUserCodeWithoutCheckingLineInfo()

Helper method implemented by the managed DM and used by the shim EE to determine if a method is user code while we're walking async return stacks. We won't want to use the regular IsUserCode() method because that method makes a round trip to the symbol provider to see if there's line info. To avoid this, we use this method to have the managed DM do its other checks. Then, when the shim EE returns to the symbol provider, the symbol provider will then check for line info. Doing it this way allows the entire managed return stack to be calculated in one round trip to the remote side, without the need for extra chatting back and forth just to determine if return stack frames are user code or not.

Location constraint: API must be called from a Monitor component (component level < 100,000).

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

(Inherited from DkmClrInstructionAddress)

Applies to