Allow to disable/enable breakpoints

Added `ToggleBreakPoint` to both interface BreakPoints/MemChecks. this would allow us to toggle the state of the breakpoint.

Also the TMemCheck::is_ranged is not longer serialized to string, since can be deduce by comparing the TMemCheck::start_address  and TMemCheck::end_address
This commit is contained in:
InusualZ
2021-02-28 08:04:50 +00:00
parent 7712f0831f
commit 4935e9b560
3 changed files with 75 additions and 30 deletions

View File

@@ -602,21 +602,21 @@ void CheckExternalExceptions()
void CheckBreakPoints()
{
if (PowerPC::breakpoints.IsAddressBreakPoint(PC))
if (!PowerPC::breakpoints.IsBreakPointEnable(PC))
return;
if (PowerPC::breakpoints.IsBreakPointBreakOnHit(PC))
CPU::Break();
if (PowerPC::breakpoints.IsBreakPointLogOnHit(PC))
{
if (PowerPC::breakpoints.IsBreakPointBreakOnHit(PC))
CPU::Break();
if (PowerPC::breakpoints.IsBreakPointLogOnHit(PC))
{
NOTICE_LOG_FMT(MEMMAP,
"BP {:08x} {}({:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} "
"{:08x}) LR={:08x}",
PC, g_symbolDB.GetDescription(PC), GPR(3), GPR(4), GPR(5), GPR(6), GPR(7),
GPR(8), GPR(9), GPR(10), GPR(11), GPR(12), LR);
}
if (PowerPC::breakpoints.IsTempBreakPoint(PC))
PowerPC::breakpoints.Remove(PC);
NOTICE_LOG_FMT(MEMMAP,
"BP {:08x} {}({:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} {:08x} "
"{:08x}) LR={:08x}",
PC, g_symbolDB.GetDescription(PC), GPR(3), GPR(4), GPR(5), GPR(6), GPR(7),
GPR(8), GPR(9), GPR(10), GPR(11), GPR(12), LR);
}
if (PowerPC::breakpoints.IsTempBreakPoint(PC))
PowerPC::breakpoints.Remove(PC);
}
void PowerPCState::SetSR(u32 index, u32 value)