Skip to content

Commit

Permalink
Merge pull request #8669 from container1234/mbp
Browse files Browse the repository at this point in the history
Breakpoints: Fix crash after clearing all memory breakpoints
  • Loading branch information
leoetlino committed Mar 15, 2020
2 parents 3c1f5c6 + 75a69b1 commit d297080
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Source/Core/Core/PowerPC/BreakPoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
const auto iter =
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/BreakPoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class MemChecks
bool OverlapsMemcheck(u32 address, u32 length) const;
void Remove(u32 address);

void Clear() { m_mem_checks.clear(); }
void Clear();
bool HasAny() const { return !m_mem_checks.empty(); }

private:
Expand Down

0 comments on commit d297080

Please sign in to comment.