Use a fake exception to exit early in case of memory breakpoints.

Change TMemCheck::Action to return whether to break rather than calling
PPCDebugInterface::BreakNow, as this simplified the implementation; then
remove said method, as that was its only caller.  One "interface" method
down, many to go...
This commit is contained in:
comex
2015-04-23 01:22:35 -04:00
parent dd7ab4812b
commit 2264e7b087
9 changed files with 42 additions and 14 deletions

View File

@ -13,6 +13,7 @@
#include "Core/Movie.h"
#include "Core/HW/CPU.h"
#include "Core/HW/DSP.h"
#include "Core/HW/Memmap.h"
#include "Core/PowerPC/PowerPC.h"
#include "VideoCommon/VideoBackendBase.h"
@ -117,7 +118,14 @@ void CCPU::EnableStepping(const bool _bStepping)
{
// SingleStep so that the "continue", "step over" and "step out" debugger functions
// work when the PC is at a breakpoint at the beginning of the block
if (PowerPC::breakpoints.IsAddressBreakPoint(PC) && PowerPC::GetMode() != PowerPC::MODE_INTERPRETER)
// If watchpoints are enabled, any instruction could be a breakpoint.
bool could_be_bp;
#ifdef ENABLE_MEM_CHECK
could_be_bp = true;
#else
could_be_bp = PowerPC::breakpoints.IsAddressBreakPoint(PC);
#endif
if (could_be_bp && PowerPC::GetMode() != PowerPC::MODE_INTERPRETER)
{
PowerPC::CoreMode oldMode = PowerPC::GetMode();
PowerPC::SetMode(PowerPC::MODE_INTERPRETER);