public static DebugWorkspace GetWorkspace() { string romName = EmuApi.GetRomInfo().GetRomName(); if (_workspace == null || _romName != romName) { if (_workspace != null) { SaveWorkspace(); } _romName = romName; _workspace = DebugWorkspace.GetWorkspace(); //Load watch entries WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries = _workspace.WatchValues; WatchManager.GetWatchManager(CpuType.Spc).WatchEntries = _workspace.SpcWatchValues; WatchManager.GetWatchManager(CpuType.Sa1).WatchEntries = _workspace.Sa1WatchValues; WatchManager.GetWatchManager(CpuType.Gsu).WatchEntries = _workspace.GsuWatchValues; LabelManager.ResetLabels(); LabelManager.SetLabels(_workspace.CpuLabels); LabelManager.SetLabels(_workspace.SpcLabels); LabelManager.SetDefaultLabels(); ImportDbgFile(); LabelManager.RefreshLabels(); //Load breakpoints BreakpointManager.SetBreakpoints(_workspace.Breakpoints); } return(_workspace); }
public static void ResetLabels() { if (_workspace != null) { _workspace.CpuLabels = new List <CodeLabel>(); _workspace.SpcLabels = new List <CodeLabel>(); LabelManager.ResetLabels(); LabelManager.SetDefaultLabels(); LabelManager.RefreshLabels(); } }
public static DebugWorkspace GetWorkspace() { string romName = EmuApi.GetRomInfo().GetRomName(); if (_workspace != null) { SaveWorkspace(); } if (_workspace == null || _romName != romName) { _romName = romName; _workspace = DebugWorkspace.GetWorkspace(); //Load watch entries WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries = _workspace.WatchValues; WatchManager.GetWatchManager(CpuType.Spc).WatchEntries = _workspace.SpcWatchValues; WatchManager.GetWatchManager(CpuType.Sa1).WatchEntries = _workspace.Sa1WatchValues; WatchManager.GetWatchManager(CpuType.Gsu).WatchEntries = _workspace.GsuWatchValues; WatchManager.GetWatchManager(CpuType.NecDsp).WatchEntries = _workspace.NecDspWatchValues; WatchManager.GetWatchManager(CpuType.Gameboy).WatchEntries = _workspace.GbWatchValues; LabelManager.ResetLabels(); LabelManager.SetLabels(_workspace.CpuLabels); LabelManager.SetLabels(_workspace.SpcLabels); LabelManager.SetLabels(_workspace.NecDspLabels); LabelManager.SetLabels(_workspace.GbLabels); LabelManager.SetDefaultLabels(); AutoImportSymbols(); } //Send breakpoints & labels to emulation core (even if the same game is running) LabelManager.RefreshLabels(); BreakpointManager.SetBreakpoints(_workspace.Breakpoints); return(_workspace); }
public static void Clear() { _workspace = null; _romName = null; LabelManager.ResetLabels(); }