fixed DeleteMemoryBreakpoint

This commit is contained in:
mrexodia 2017-02-07 12:12:47 +01:00
parent 31cbdc957b
commit 0b0caa6f3e
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 7 additions and 2 deletions

View File

@ -356,8 +356,13 @@ namespace GleeBug
bool Process::DeleteMemoryBreakpoint(ptr address)
{
//find the hardware breakpoint
auto found = breakpoints.find({ BreakpointType::Hardware, address });
//find the memory breakpoint range
auto range = memoryBreakpointRanges.find(Range(address, address));
if(range == memoryBreakpointRanges.end())
return false;
//find the memory breakpoint
auto found = breakpoints.find({ BreakpointType::Memory, range->first });
if (found == breakpoints.end())
return false;
const auto & info = found->second;