Skip to content

Commit

Permalink
Starting to refactor the debugger to do stepping.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed May 2, 2019
1 parent 5e53a12 commit 4fd87ba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ bool PCSX::Debug::IsMapMarked(uint32_t address, int mask) {
void PCSX::Debug::ProcessDebug() {
const uint32_t& pc = PCSX::g_emulator.m_psxCpu->m_psxRegs.pc;
DebugCheckBP(PCSX::g_emulator.m_psxCpu->m_psxRegs.pc, BE);
const bool isJAL = (PCSX::g_emulator.m_psxCpu->m_psxRegs.code >> 26) == 3;
const bool isJALR = ((PCSX::g_emulator.m_psxCpu->m_psxRegs.code >> 26) == 0) &&
((PCSX::g_emulator.m_psxCpu->m_psxRegs.code & 0x3F) == 9);
const bool isJRRA = ((PCSX::g_emulator.m_psxCpu->m_psxRegs.code >> 26) == 0) &&
((PCSX::g_emulator.m_psxCpu->m_psxRegs.code & 0x3f) == 8) && _Rd_ == 31;
if (m_mapping_e) {
MarkMap(PCSX::g_emulator.m_psxCpu->m_psxRegs.pc, MAP_EXEC);
// JAL
if ((PCSX::g_emulator.m_psxCpu->m_psxRegs.code >> 26) == 3) {
MarkMap(_JumpTarget_, MAP_EXEC_JAL);
}
if (isJAL) MarkMap(_JumpTarget_, MAP_EXEC_JAL);
// JALR
if (((PCSX::g_emulator.m_psxCpu->m_psxRegs.code >> 26) == 0) &&
((PCSX::g_emulator.m_psxCpu->m_psxRegs.code & 0x3F) == 9)) {
MarkMap(_Rd_, MAP_EXEC_JAL);
}
if (isJALR) MarkMap(_Rd_, MAP_EXEC_JAL);
}
}

Expand Down

0 comments on commit 4fd87ba

Please sign in to comment.