mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
Debugger: Fixed bug that copied watch entries from rom to rom
While the debugger was active and the current rom had watch entries, opening a new rom for the same console that had never been opened in the debugger would end up copying the watch entries from the previous rom into the new rom's workspace
This commit is contained in:
parent
fadf7c4d44
commit
16d6d70376
2 changed files with 9 additions and 0 deletions
|
@ -282,6 +282,8 @@ namespace Mesen.Debugger.Utilities
|
|||
|
||||
LabelManager.ResetLabels();
|
||||
BreakpointManager.ClearBreakpoints();
|
||||
WatchManager.ClearEntries();
|
||||
|
||||
if(dbgWorkspace.WorkspaceByCpu.Count == 0) {
|
||||
DefaultLabelHelper.SetDefaultLabels();
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,13 @@ namespace Mesen.Debugger
|
|||
return manager;
|
||||
}
|
||||
|
||||
public static void ClearEntries()
|
||||
{
|
||||
foreach(WatchManager wm in _watchManagers.Values) {
|
||||
wm.WatchEntries = new();
|
||||
}
|
||||
}
|
||||
|
||||
public WatchManager(CpuType cpuType)
|
||||
{
|
||||
_cpuType = cpuType;
|
||||
|
|
Loading…
Add table
Reference in a new issue