private void mnuAddToWatch_Click(object sender, EventArgs e) { if (lstLabels.SelectedIndices.Count > 0) { WatchManager.GetWatchManager(_cpuType).AddWatch("[" + GetSelectedLabel().Label + "]"); } }
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); }
private void mnuAddToWatch_Click(object sender, EventArgs e) { if (_memoryType.SupportsWatch()) { string[] toAdd = Enumerable.Range(SelectionStartAddress, SelectionEndAddress - SelectionStartAddress + 1).Select((num) => $"[${num.ToString("X6")}]").ToArray(); WatchManager.GetWatchManager(_memoryType.ToCpuType()).AddWatch(toAdd); } }
public static void SaveWorkspace() { if (_workspace != null) { _workspace.WatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries); _workspace.SpcWatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Spc).WatchEntries); _workspace.Breakpoints = new List <Breakpoint>(BreakpointManager.Breakpoints); _workspace.Save(); } }
public static void SaveWorkspace() { if (_workspace != null) { _workspace.WatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries); _workspace.SpcWatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Spc).WatchEntries); _workspace.Sa1WatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Sa1).WatchEntries); _workspace.GsuWatchValues = new List <string>(WatchManager.GetWatchManager(CpuType.Gsu).WatchEntries); _workspace.Breakpoints = new List <Breakpoint>(BreakpointManager.Breakpoints); _workspace.CpuLabels = new List <CodeLabel>(LabelManager.GetLabels(CpuType.Cpu)); _workspace.SpcLabels = new List <CodeLabel>(LabelManager.GetLabels(CpuType.Spc)); _workspace.Save(); } }
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(); } }
private void mnuAddToWatch_Click(object sender, EventArgs e) { LocationInfo location = GetActionTarget(); if (location.Symbol != null) { WatchManager.GetWatchManager(_manager.CpuType).AddWatch("[" + location.Symbol.Name + "]"); } else if (location.Label != null) { string label = location.Label.Label; if (location.ArrayIndex.HasValue) { label += "+" + location.ArrayIndex.Value.ToString(); } WatchManager.GetWatchManager(_manager.CpuType).AddWatch("[" + label + "]"); } else if (location.Address >= 0) { WatchManager.GetWatchManager(_manager.CpuType).AddWatch("[$" + location.Address.ToString("X" + _manager.AddressSize.ToString()) + "]"); } }
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); }