From b8e6f52419816a7afa6629c401c23faf8ae8ae67 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 9 Nov 2014 17:00:59 -0500 Subject: [PATCH] ARM: Fixed dyncom to use reg15 for PC (this core doesn't use pc variable). - Fixes single stepping in debugger. --- src/core/arm/dyncom/arm_dyncom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index 0b5dcccb90..a3ed3e31e5 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp @@ -60,7 +60,7 @@ void ARM_DynCom::SetPC(u32 pc) { * @return Returns current PC */ u32 ARM_DynCom::GetPC() const { - return state->pc; + return state->Reg[15]; } /** @@ -129,7 +129,7 @@ void ARM_DynCom::SaveContext(ThreadContext& ctx) { ctx.sp = state->Reg[13]; ctx.lr = state->Reg[14]; - ctx.pc = state->pc; + ctx.pc = state->Reg[15]; ctx.cpsr = state->Cpsr; ctx.fpscr = state->VFP[1];