ICorDebugILFrame4::GetLocalVariableEx 方法ICorDebugILFrame4::GetLocalVariableEx Method

[.NET Framework 4.5.2 與更新版本提供支援][Supported in the .NET Framework 4.5.2 and later versions]

從此中繼語言 (IL) 堆疊框架中取得指定區域變數的值,並選擇是否要存取加入分析工具 ReJIT 測試設備中的變數。Gets the value of the specified local variable in this intermediate language (IL) stack frame, and optionally accesses a variable added in profiler ReJIT instrumentation.

語法Syntax

HRESULT GetLocalVariableEx(  
   [in] ILCodeKind flags,
   [in] DWORD dwIndex,
   [out] ICorDebugValue **ppValue  
);  

參數Parameters

flags
ILCodeKind 列舉成員,指定框架中是否包含在 profiler ReJIT 檢測中新增的變數。[in] An ILCodeKind enumeration member that specifies whether a variable added in profiler ReJIT instrumentation is included in the frame.

dwIndex
[in] IL 堆疊框架中之區域變數的索引。[in] The index of the local variable in the IL stack frame.

ppValue
擴展代表抓取值的 "ICorDebugValue" 物件位址的指標。[out] A pointer to the address of an "ICorDebugValue" object that represents the retrieved value.

備註Remarks

這個方法類似于 GetLocalVariable 方法,不同之處在于它會選擇性地存取在 profiler ReJIT 檢測中新增的變數。This method is similar to the GetLocalVariable method, except that it optionally accesses a variable added in profiler ReJIT instrumentation. 使用的值呼叫此方法 flags ILCODE_ORIGINAL_IL 相當於呼叫 GetLocalVariable; 如果方法是以其他區域變數進行檢測,則無法存取這些變數。Calling this method with a flags value of ILCODE_ORIGINAL_IL is equivalent to calling GetLocalVariable; if the method is instrumented with additional local variables, those variables cannot be accessed. ILCODE_REJIT_IL 允許偵錯程式存取加入分析工具 ReJIT 測試設備中的區域變數。ILCODE_REJIT_IL allows the debugger to access the local variables added in profiler ReJIT instrumentation. 若測試設備不是 IL,此方法會傳回 E_INVALIDARGIf the IL is not instrumented, the method returns E_INVALIDARG.

需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.5.2 起可用Available since 4.5.2.NET Framework Versions: 自 4.5.2 起可用Available since 4.5.2

另請參閱See also