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] 旧版本函数中指令指针的 Microsoft 中间语言 (MSIL) 偏移量。

备注

此回调使调试器有机会通过调用 ICorDebugILFrame2::RemapFunction 方法将指令指针重新映射到指定函数的新版本中的正确位置。 如果调试器在调用 ICorDebugController::Continue 方法之前没有调用RemapFunction,运行时将继续执行原有代码并将在下一个序列点激发另一个 FunctionRemapOpportunity 回调。

将为正在执行给定函数的早期版本的每个帧调用此回调,直至调试器返回 S_OK 为止。

要求

**平台:**请参见 .NET Framework 系统要求

头文件: CorDebug.idl、CorDebug.h

**库:**CorGuids.lib

**.NET Framework 版本:**4、3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

请参见

参考

ICorDebugManagedCallback2 接口

ICorDebugManagedCallback 接口