public WabbitcodeDebugger(string outputFile) { _disposed = false; _debuggerService = DependencyFactory.Resolve <IDebuggerService>(); _fileService = DependencyFactory.Resolve <IFileService>(); _symbolService = DependencyFactory.Resolve <ISymbolService>(); WabbitcodeBreakpointManager.OnBreakpointAdded += WabbitcodeBreakpointManager_OnBreakpointAdded; WabbitcodeBreakpointManager.OnBreakpointRemoved += WabbitcodeBreakpointManager_OnBreakpointRemoved; Debug.WriteLine("Creating wabbitemu debugger"); _debugger = new WabbitemuDebugger(); Debug.WriteLine("Loading file " + outputFile); _debugger.LoadFile(outputFile); _debugger.Visible = true; _debugger.OnBreakpoint += BreakpointHit; _debugger.OnClose += DebuggerOnClose; CurrentDebuggingFile = outputFile; IsAnApp = outputFile.EndsWith(".8xk"); _memoryAllocations = new List <KeyValuePair <ushort, ushort> >(); CallStack = new Stack <CallStackEntry>(); MachineStack = new Stack <StackEntry>(); _oldSp = IsAnApp ? TopStackApp : (ushort)0xFFFF; SetupInternalBreakpoints(); }
public void EndDebug() { IsAnApp = false; if (_debugger == null) { return; } _debugger.EndDebug(); _debugger = null; }
public void EndDebug() { IsAnApp = false; if (_debugger == null) { return; } _debugger.OnBreakpoint -= BreakpointHit; _debugger.EndDebug(); _debugger.Dispose(); _debugger = null; foreach (var breakpoint in WabbitcodeBreakpointManager.Breakpoints) { breakpoint.UpdateAddress(null); } }