Debugger: Add memory breakpoint management.

This commit is contained in:
Unknown W. Brackets committed 2018-06-08 06:59:18 -07:00
1 parent 29d93c56c7
commit b2cc4a0965
9 files changed
+227 -13

No files matched your search

+15 -2
View File
@@ -452,15 +452,28 @@ void CBreakPoints::ChangeMemCheckLogFormat(u32 start, u32 end, const std::string
}
}
bool CBreakPoints::GetMemCheck(u32 start, u32 end, MemCheck *check) {
std::lock_guard<std::mutex> guard(memCheckMutex_);
size_t mc = FindMemCheck(start, end);
if (mc != INVALID_MEMCHECK) {
*check = memChecks_[mc];
return true;
}
return false;
}
static inline u32 NotCached(u32 val)
{
// Remove the cached part of the address.
return val & ~0x40000000;
}
MemCheck *CBreakPoints::GetMemCheck(u32 address, int size) {
bool CBreakPoints::GetMemCheckInRange(u32 address, int size, MemCheck *check) {
std::lock_guard<std::mutex> guard(memCheckMutex_);
return GetMemCheckLocked(address, size);
auto result = GetMemCheckLocked(address, size);
if (result)
*check = *result;
return result != nullptr;
}
MemCheck *CBreakPoints::GetMemCheckLocked(u32 address, int size) {