public static void ResetWorkspace() { if (_workspace != null) { _workspace.Breakpoints = new List <Breakpoint>(); _workspace.WatchValues = new List <string>(); _workspace.SpcWatchValues = new List <string>(); _workspace.Sa1WatchValues = new List <string>(); _workspace.GsuWatchValues = new List <string>(); _workspace.NecDspWatchValues = new List <string>(); _workspace.GbWatchValues = new List <string>(); _workspace.CpuLabels = new List <CodeLabel>(); _workspace.SpcLabels = new List <CodeLabel>(); _workspace.NecDspLabels = new List <CodeLabel>(); _workspace.GbLabels = new List <CodeLabel>(); 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; BreakpointManager.SetBreakpoints(_workspace.Breakpoints); LabelManager.SetDefaultLabels(); LabelManager.RefreshLabels(); _workspace.Save(); Clear(); } }
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 ResetWorkspace() { if (_workspace != null) { _workspace.Breakpoints = new List <Breakpoint>(); _workspace.WatchValues = new List <string>(); _workspace.SpcWatchValues = new List <string>(); WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries = _workspace.WatchValues; WatchManager.GetWatchManager(CpuType.Spc).WatchEntries = _workspace.SpcWatchValues; BreakpointManager.SetBreakpoints(_workspace.Breakpoints); _workspace.Save(); Clear(); } }
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; //Load breakpoints BreakpointManager.SetBreakpoints(_workspace.Breakpoints); } return(_workspace); }
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); }
private static void UpdateAssertBreakpoints() { List <Breakpoint> asserts = new List <Breakpoint>(); Action <CodeLabel, string, CpuType> addAssert = (CodeLabel label, string condition, CpuType cpuType) => { asserts.Add(new Breakpoint() { BreakOnExec = true, MemoryType = label.MemoryType, CpuType = cpuType, Address = label.Address, Condition = "!(" + condition + ")", IsAssert = true }); }; foreach (CodeLabel label in _labels) { foreach (string commentLine in label.Comment.Split('\n')) { Match m = LabelManager.AssertRegex.Match(commentLine); if (m.Success) { CpuType cpuType = label.MemoryType.ToCpuType(); addAssert(label, m.Groups[1].Value, cpuType); if (cpuType == CpuType.Cpu) { addAssert(label, m.Groups[1].Value, CpuType.Sa1); } } } } BreakpointManager.Asserts = asserts; BreakpointManager.SetBreakpoints(); }