summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-10-02 16:31:44 -0400
committerGitHub <noreply@github.com>2016-10-02 16:31:44 -0400
commitf292df233150c4ea2bdee38379c4fca1209b53fe (patch)
tree88cb77f74550e9d4a4f142007fe932c3aaff0776 /Source/Core
parentffcd69eaac6a38d503765fc2b3b7ef291cccb8f2 (diff)
parent39edc1d91e923c10ae7c8e8c9fdb2751f2ff2e37 (diff)
Merge pull request #4217 from EmptyChaos/toggle-memcheck
PPCDebugInterface: Let ToggleMemCheck create the first memcheck
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Debugger/PPCDebugInterface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/Core/Debugger/PPCDebugInterface.cpp b/Source/Core/Core/Debugger/PPCDebugInterface.cpp
index b07b3737c8..3073178d23 100644
--- a/Source/Core/Core/Debugger/PPCDebugInterface.cpp
+++ b/Source/Core/Core/Debugger/PPCDebugInterface.cpp
@@ -137,12 +137,12 @@ void PPCDebugInterface::ClearAllMemChecks()
bool PPCDebugInterface::IsMemCheck(unsigned int address)
{
- return (PowerPC::memchecks.HasAny() && PowerPC::memchecks.GetMemCheck(address));
+ return PowerPC::memchecks.GetMemCheck(address) != nullptr;
}
void PPCDebugInterface::ToggleMemCheck(unsigned int address, bool read, bool write, bool log)
{
- if (PowerPC::memchecks.HasAny() && !PowerPC::memchecks.GetMemCheck(address))
+ if (!IsMemCheck(address))
{
// Add Memory Check
TMemCheck MemCheck;
@@ -157,7 +157,9 @@ void PPCDebugInterface::ToggleMemCheck(unsigned int address, bool read, bool wri
PowerPC::memchecks.Add(MemCheck);
}
else
+ {
PowerPC::memchecks.Remove(address);
+ }
}
void PPCDebugInterface::InsertBLR(unsigned int address, unsigned int value)