/// <summary> /// Gets the active stack frame. /// </summary> /// <returns>Active stack frame.</returns> public CorFrame GetActiveFrame() { ICorDebugFrame coframe; cothread.GetActiveFrame(out coframe); return(new CorFrame(coframe, options)); }
/// <summary> /// Finds appropriete SequncePointMap instances and builds SequencePointRemapper, gets new IL offset and call RemapFunction. /// </summary> public void FunctionRemapOpportunity(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFunction pOldFunction, ICorDebugFunction pNewFunction, uint oldILOffset) { ICorDebugILFrame2 frame = (ICorDebugILFrame2) pThread.GetActiveFrame(); uint nToken = pOldFunction.GetToken(); SequencePointRemapper remapper; if(!remappers.TryGetValue(nToken,out remapper)){ throw new KeyNotFoundException("Methods sequence points not found."); } frame.__RemapFunction(remapper.TranslateILOffset(oldILOffset)); }
/// <summary> /// Finds appropriete SequncePointMap instances and builds SequencePointRemapper, gets new IL offset and call RemapFunction. /// </summary> public void FunctionRemapOpportunity(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFunction pOldFunction, ICorDebugFunction pNewFunction, uint oldILOffset) { ICorDebugILFrame2 frame = (ICorDebugILFrame2)pThread.GetActiveFrame(); uint nToken = pOldFunction.GetToken(); SequencePointRemapper remapper; if (!remappers.TryGetValue(nToken, out remapper)) { throw new KeyNotFoundException("Methods sequence points not found."); } frame.__RemapFunction(remapper.TranslateILOffset(oldILOffset)); }