mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add breakpoints to x86 jit for easier debugging.
They should be really fast so leaving them on in release.
This commit is contained in:
parent
faf4b76bbb
commit
a9293c8923
1 changed files with 21 additions and 0 deletions
|
@ -25,9 +25,21 @@
|
|||
#include "RegCache.h"
|
||||
#include "Jit.h"
|
||||
|
||||
#include "../../Host.h"
|
||||
#include "../../Debugger/Breakpoints.h"
|
||||
|
||||
namespace MIPSComp
|
||||
{
|
||||
|
||||
static void JitBreakpoint()
|
||||
{
|
||||
Core_EnableStepping(true);
|
||||
host->SetDebugMode(true);
|
||||
|
||||
if (CBreakPoints::IsTempBreakPoint(currentMIPS->pc))
|
||||
CBreakPoints::RemoveBreakPoint(currentMIPS->pc);
|
||||
}
|
||||
|
||||
Jit::Jit(MIPSState *mips) : blocks(mips), mips_(mips)
|
||||
{
|
||||
blocks.Init();
|
||||
|
@ -107,6 +119,15 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b)
|
|||
|
||||
MIPSCompileOp(inst);
|
||||
|
||||
// Jit breakpoints are quite fast, so let's do them in release too.
|
||||
if (CBreakPoints::IsAddressBreakPoint(js.compilerPC))
|
||||
{
|
||||
FlushAll();
|
||||
MOV(32, M(&mips_->pc), Imm32(js.compilerPC));
|
||||
CALL(&JitBreakpoint);
|
||||
WriteSyscallExit();
|
||||
}
|
||||
|
||||
js.compilerPC += 4;
|
||||
numInstructions++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue