mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 14:19:02 +00:00
Merge pull request #4217 from EmptyChaos/toggle-memcheck
PPCDebugInterface: Let ToggleMemCheck create the first memcheck
This commit is contained in:
commit
f292df2331
1 changed files with 4 additions and 2 deletions
|
@ -137,12 +137,12 @@ void PPCDebugInterface::ClearAllMemChecks()
|
||||||
|
|
||||||
bool PPCDebugInterface::IsMemCheck(unsigned int address)
|
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)
|
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
|
// Add Memory Check
|
||||||
TMemCheck MemCheck;
|
TMemCheck MemCheck;
|
||||||
|
@ -157,8 +157,10 @@ void PPCDebugInterface::ToggleMemCheck(unsigned int address, bool read, bool wri
|
||||||
PowerPC::memchecks.Add(MemCheck);
|
PowerPC::memchecks.Add(MemCheck);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
PowerPC::memchecks.Remove(address);
|
PowerPC::memchecks.Remove(address);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PPCDebugInterface::InsertBLR(unsigned int address, unsigned int value)
|
void PPCDebugInterface::InsertBLR(unsigned int address, unsigned int value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue