public void DebugStep() { if ((Core.MainForm.m_CurrentActiveTool != null) && (!Core.MainForm.EmulatorSupportsDebugging(Core.MainForm.m_CurrentActiveTool))) { return; } if ((Core.MainForm.AppState == Types.StudioState.DEBUGGING_BROKEN) || (Core.MainForm.AppState == Types.StudioState.DEBUGGING_RUN)) { Core.MainForm.m_DebugMemory.InvalidateAllMemory(); Debugger.StepInto(); Debugger.RefreshRegistersAndWatches(); Debugger.SetAutoRefreshMemory(Core.MainForm.m_DebugMemory.MemoryStart, Core.MainForm.m_DebugMemory.MemorySize, Core.MainForm.m_DebugMemory.MemoryAsCPU ? MemorySource.AS_CPU : MemorySource.RAM); Debugger.RefreshMemory(Core.MainForm.m_DebugMemory.MemoryStart, Core.MainForm.m_DebugMemory.MemorySize, Core.MainForm.m_DebugMemory.MemoryAsCPU ? MemorySource.AS_CPU : MemorySource.RAM); Core.Executing.BringStudioToForeground(); if (Core.MainForm.AppState == Types.StudioState.DEBUGGING_RUN) { FirstActionAfterBreak = true; } Core.MainForm.AppState = Types.StudioState.DEBUGGING_BROKEN; Core.MainForm.SetGUIForDebugging(true); } }
public void SetupDebugger(ToolInfo RunTool) { if (RunTool == null) { return; } if (RunTool.Filename.ToUpper().Contains("XMEGA65")) { Debugger = new XMEGA65RemoteDebugger(Core); } else if (RunTool.DebugArguments.ToUpper().Contains("-BINARYMONITOR")) { Debugger = new VICERemoteDebuggerBinaryInterface(Core); var viceDebugger = Debugger as VICERemoteDebuggerBinaryInterface; viceDebugger.DocumentEvent += new BaseDocument.DocumentEventHandler(Core.MainForm.Document_DocumentEvent); } else { Debugger = new VICERemoteDebugger(Core); var viceDebugger = Debugger as VICERemoteDebugger; viceDebugger.DocumentEvent += new BaseDocument.DocumentEventHandler(Core.MainForm.Document_DocumentEvent); } // default to currently visible memory view Debugger.SetAutoRefreshMemory(Core.MainForm.m_DebugMemory.MemoryStart, Core.MainForm.m_DebugMemory.MemorySize, Core.MainForm.m_DebugMemory.MemoryAsCPU ? MemorySource.AS_CPU : MemorySource.RAM); // pass on remembered wathes foreach (var watch in Core.MainForm.m_DebugWatch.m_WatchEntries) { Debugger.AddWatchEntry(watch); } Debugger.DebugEvent += Core.MainForm.Debugger_DebugEvent; }