diff options
Diffstat (limited to 'Source/Core/Common/BreakPoints.cpp')
| -rw-r--r-- | Source/Core/Common/BreakPoints.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index 74dcb45030..277b956e61 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -165,8 +165,13 @@ void MemChecks::AddFromStrings(const TMemChecksStr& mcstrs) void MemChecks::Add(const TMemCheck& _rMemoryCheck) { + bool had_any = HasAny(); if (GetMemCheck(_rMemoryCheck.StartAddress) == nullptr) m_MemChecks.push_back(_rMemoryCheck); + // If this is the first one, clear the JIT cache so it can switch to + // watchpoint-compatible code. + if (!had_any) + jit->ClearCache(); } void MemChecks::Remove(u32 _Address) @@ -179,6 +184,8 @@ void MemChecks::Remove(u32 _Address) return; } } + if (!HasAny()) + jit->ClearCache(); } TMemCheck *MemChecks::GetMemCheck(u32 address) @@ -200,7 +207,7 @@ TMemCheck *MemChecks::GetMemCheck(u32 address) return nullptr; } -void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc) +bool TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc) { if ((write && OnWrite) || (!write && OnRead)) { @@ -213,9 +220,9 @@ void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bo ); } - if (Break) - debug_interface->BreakNow(); + return true; } + return false; } |
