Merge pull request #8669 from container1234/mbp

Breakpoints: Fix crash after clearing all memory breakpoints
This commit is contained in:
Léo Lam 2020-03-15 18:40:05 +01:00 committed by GitHub
commit d297080f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -196,6 +196,15 @@ void MemChecks::Remove(u32 address)
}); });
} }
void MemChecks::Clear()
{
Core::RunAsCPUThread([&] {
m_mem_checks.clear();
JitInterface::ClearCache();
PowerPC::DBATUpdated();
});
}
TMemCheck* MemChecks::GetMemCheck(u32 address, size_t size) TMemCheck* MemChecks::GetMemCheck(u32 address, size_t size)
{ {
const auto iter = const auto iter =

View File

@ -88,7 +88,7 @@ public:
bool OverlapsMemcheck(u32 address, u32 length) const; bool OverlapsMemcheck(u32 address, u32 length) const;
void Remove(u32 address); void Remove(u32 address);
void Clear() { m_mem_checks.clear(); } void Clear();
bool HasAny() const { return !m_mem_checks.empty(); } bool HasAny() const { return !m_mem_checks.empty(); }
private: private: