DkmInstructionSymbol.GetCompilerId Method

Definition

Overloads

GetCompilerId(DkmInspectionSession)

Returns the compiler id (LanguageId/VendorId) of a given symbol.

For the Microsoft PDB reader, if the PDB was created by a compiler which used ISymUnmanagedWriter, then the PDB reader will be able to determine the correct DkmCompilerId from the LanguageId/VendorId pair passed from ISymUnmanagedWriter.DefineDocument.

If the PDB was created by a compiler which did not use ISymUnmanagedWriter, the PDB reader may be able to obtain the DkmCompilerId from the S_COMPILE* PDB records. For this to work, the compiler must first emit the S_COMPILE* record for each compiland. The compiler needs to be sure to correctly fill out the language enumeration value, and the compiler string. The compiler should ensure that the compiler string is sufficiently specific to use for selecting an expression evaluator; it is recommended to include a company name. After emitting the Enum/Name pair, the setup for the expression evaluator should then register this pair with the debugger. To do so, the expression evaluator should set this registry key: %VSRegistryRoot%\Debugger\CodeView Compilers%CodeViewLanguageCode%:%CompilerName% and define the VendorId/LanguageId.

GetCompilerId(DkmWorkList, DkmInspectionSession, DkmCompletionRoutine<DkmGetCompilerIdAsyncResult>)

Returns the compiler id (LanguageId/VendorId) of a given symbol.

For the Microsoft PDB reader, if the PDB was created by a compiler which used ISymUnmanagedWriter, then the PDB reader will be able to determine the correct DkmCompilerId from the LanguageId/VendorId pair passed from ISymUnmanagedWriter.DefineDocument.

If the PDB was created by a compiler which did not use ISymUnmanagedWriter, the PDB reader may be able to obtain the DkmCompilerId from the S_COMPILE* PDB records. For this to work, the compiler must first emit the S_COMPILE* record for each compiland. The compiler needs to be sure to correctly fill out the language enumeration value, and the compiler string. The compiler should ensure that the compiler string is sufficiently specific to use for selecting an expression evaluator; it is recommended to include a company name. After emitting the Enum/Name pair, the setup for the expression evaluator should then register this pair with the debugger. To do so, the expression evaluator should set this registry key: %VSRegistryRoot%\Debugger\CodeView Compilers%CodeViewLanguageCode%:%CompilerName% and define the VendorId/LanguageId.

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

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

GetCompilerId(DkmInspectionSession)

Returns the compiler id (LanguageId/VendorId) of a given symbol.

For the Microsoft PDB reader, if the PDB was created by a compiler which used ISymUnmanagedWriter, then the PDB reader will be able to determine the correct DkmCompilerId from the LanguageId/VendorId pair passed from ISymUnmanagedWriter.DefineDocument.

If the PDB was created by a compiler which did not use ISymUnmanagedWriter, the PDB reader may be able to obtain the DkmCompilerId from the S_COMPILE* PDB records. For this to work, the compiler must first emit the S_COMPILE* record for each compiland. The compiler needs to be sure to correctly fill out the language enumeration value, and the compiler string. The compiler should ensure that the compiler string is sufficiently specific to use for selecting an expression evaluator; it is recommended to include a company name. After emitting the Enum/Name pair, the setup for the expression evaluator should then register this pair with the debugger. To do so, the expression evaluator should set this registry key: %VSRegistryRoot%\Debugger\CodeView Compilers%CodeViewLanguageCode%:%CompilerName% and define the VendorId/LanguageId.

public:
 Microsoft::VisualStudio::Debugger::Evaluation::DkmCompilerId GetCompilerId(Microsoft::VisualStudio::Debugger::Evaluation::DkmInspectionSession ^ InspectionSession);
public Microsoft.VisualStudio.Debugger.Evaluation.DkmCompilerId GetCompilerId (Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession InspectionSession);
public Microsoft.VisualStudio.Debugger.Evaluation.DkmCompilerId GetCompilerId (Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession? InspectionSession);
member this.GetCompilerId : Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession -> Microsoft.VisualStudio.Debugger.Evaluation.DkmCompilerId
Public Function GetCompilerId (InspectionSession As DkmInspectionSession) As DkmCompilerId

Parameters

InspectionSession
DkmInspectionSession

[In,Optional] A reference object describing the current inspection session. Common usage is for symbol providers to cache lookups using its data container.

Returns

[Out] LanguageId/VendorId for the compiler which produced the code for this symbol. If this is unknown (ex: no symbols info for this block), both values will be Guid.Empty. Otherwise, both values should be non-zero.

Applies to

GetCompilerId(DkmWorkList, DkmInspectionSession, DkmCompletionRoutine<DkmGetCompilerIdAsyncResult>)

Returns the compiler id (LanguageId/VendorId) of a given symbol.

For the Microsoft PDB reader, if the PDB was created by a compiler which used ISymUnmanagedWriter, then the PDB reader will be able to determine the correct DkmCompilerId from the LanguageId/VendorId pair passed from ISymUnmanagedWriter.DefineDocument.

If the PDB was created by a compiler which did not use ISymUnmanagedWriter, the PDB reader may be able to obtain the DkmCompilerId from the S_COMPILE* PDB records. For this to work, the compiler must first emit the S_COMPILE* record for each compiland. The compiler needs to be sure to correctly fill out the language enumeration value, and the compiler string. The compiler should ensure that the compiler string is sufficiently specific to use for selecting an expression evaluator; it is recommended to include a company name. After emitting the Enum/Name pair, the setup for the expression evaluator should then register this pair with the debugger. To do so, the expression evaluator should set this registry key: %VSRegistryRoot%\Debugger\CodeView Compilers%CodeViewLanguageCode%:%CompilerName% and define the VendorId/LanguageId.

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

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

public:
 void GetCompilerId(Microsoft::VisualStudio::Debugger::DkmWorkList ^ WorkList, Microsoft::VisualStudio::Debugger::Evaluation::DkmInspectionSession ^ InspectionSession, Microsoft::VisualStudio::Debugger::DkmCompletionRoutine<Microsoft::VisualStudio::Debugger::Symbols::DkmGetCompilerIdAsyncResult> ^ CompletionRoutine);
public void GetCompilerId (Microsoft.VisualStudio.Debugger.DkmWorkList WorkList, Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession InspectionSession, Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Symbols.DkmGetCompilerIdAsyncResult> CompletionRoutine);
public void GetCompilerId (Microsoft.VisualStudio.Debugger.DkmWorkList WorkList, Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession? InspectionSession, Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Symbols.DkmGetCompilerIdAsyncResult> CompletionRoutine);
member this.GetCompilerId : Microsoft.VisualStudio.Debugger.DkmWorkList * Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionSession * Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Symbols.DkmGetCompilerIdAsyncResult> -> unit
Public Sub GetCompilerId (WorkList As DkmWorkList, InspectionSession As DkmInspectionSession, CompletionRoutine As DkmCompletionRoutine(Of DkmGetCompilerIdAsyncResult))

Parameters

WorkList
DkmWorkList

WorkList to append the new work item to.

InspectionSession
DkmInspectionSession

[In,Optional] A reference object describing the current inspection session. Common usage is for symbol providers to cache lookups using its data container.

CompletionRoutine
DkmCompletionRoutine<DkmGetCompilerIdAsyncResult>

Routine to fire when the request is complete. If the request is successfully appended to the work list, this will always fire (including when the operation is canceled). This will never fire if appending the work item fails.

Applies to