internal static IEnumerable <CorApi.Portable.Frame> GetFrames(CorApi.Portable.Thread thread) { var corFrames = new List <CorApi.Portable.Frame> (); try { foreach (CorApi.Portable.Chain chain in thread.Chains) { if (!chain.IsManaged) { continue; } try { var chainFrames = chain.Frames; foreach (CorApi.Portable.Frame frame in chainFrames) { corFrames.Add(frame); } } catch (COMException e) { DebuggerLoggingService.LogMessage("Failed to enumerate frames of chain: {0}", e.Message); } } } catch (COMException e) { DebuggerLoggingService.LogMessage("Failed to enumerate chains of thread: {0}", e.Message); } return(corFrames); }
public CorBacktrace(CorApi.Portable.Thread thread, CorDebuggerSession session) : base(session.ObjectAdapter) { this.session = session; this.thread = thread; threadId = thread.Id; frames = new List <CorApi.Portable.Frame> (GetFrames(thread)); evalTimestamp = CorDebuggerSession.EvaluationTimestamp; }
void CheckTimestamp( ) { if (evalTimestamp != CorDebuggerSession.EvaluationTimestamp) { thread = null; frame = null; corEval = null; activeChain = null; } }