分享方式:


ICorDebugManagedCallback2::FunctionRemapOpportunity 方法

通知調試程式,程式代碼執行已在舊版的已編輯函式中到達序列點。

語法

HRESULT FunctionRemapOpportunity (
    [in] ICorDebugAppDomain   *pAppDomain,
    [in] ICorDebugThread      *pThread,
    [in] ICorDebugFunction    *pOldFunction,
    [in] ICorDebugFunction    *pNewFunction,
    [in] ULONG32              oldILOffset
);

參數

pAppDomain [in]ICorDebugAppDomain 物件的指標,代表包含已編輯函式的應用程式域。

pThread [in]ICorDebugThread 物件的指標,代表遇到重新對應斷點的線程。

pOldFunction [in]ICorDebugFunction 物件的指標,代表目前在線程上執行的函式版本。

pNewFunction [in]代表函式最新版本之 ICorDebugFunction 物件的指標。

oldILOffset [in]舊版函式中指令指標的通用中繼語言 (CIL) 位移。

備註

此回呼可讓調試程式藉由呼叫 ICorDebugILFrame2::RemapFunction 方法,將指令指標重新對應至指定函式新版本的正確位置。 如果調試程式在呼叫 ICorDebugController::Continue 方法之前未呼叫RemapFunction,運行時間會繼續執行舊的程式碼,並在下一個序列點引發另一個FunctionRemapOpportunity回呼。

在調試程式傳回S_OK之前,會針對執行舊版指定函式的每個畫面叫用此回呼。

需求

平台:請參閱系統需求

標頭:CorDebug.idl、CorDebug.h

程式庫:CorGuids.lib

.NET Framework 版本: 自 2.0 起提供

另請參閱