/// <summary> /// Gets the current frame. /// </summary> /// <param name="threadId">The thread identifier.</param> /// <returns>Frame.</returns> public Frame GetCurrentFrame(int threadId) { var frame = new Frame(); frame.Position = GetCurrentPosition(threadId); frame.StackTrace = StackFacade.GetCurrentStackTrace(threadId); frame.RegisterSet = RegisterFacade.GetCurrentRegisterSet(threadId, DebugEngineProxy.Is32Bit ? Register.DefaultX86Registers : Register.DefaultX64Registers); frame.DisassemblyLine = DisassemblyFacade.GetDisassemblyLines(threadId, 1).Single(); frame.ThreadId = threadId; return(frame); }
/// <summary> /// Gets the current frame. /// </summary> /// <returns>Frame.</returns> public Frame GetCurrentFrame() { var position = GetCurrentPosition(); var currentStack = StackFacade.GetCurrentStackTrace(); var registers = RegisterFacade.GetCurrentRegisterSet(Register.All); var disassembly = DisassemblyFacade.GetDisassemblyLines(1).Single(); return(new Frame { Position = position, StackTrace = currentStack, RegisterSet = registers, DisassemblyLine = disassembly, ThreadId = DebugEngineProxy.GetCurrentThreadId() }); }