diff --git a/Core/Core.cpp b/Core/Core.cpp index 1a604f2241..b2d34b6b01 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -426,6 +426,7 @@ void Core_Resume() { coreState = CORE_RUNNING; coreStatePending = false; m_StepCond.notify_all(); + System_Notify(SystemNotification::DEBUG_MODE_CHANGE); } bool Core_NextFrame() { diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 8ede3386f5..351b222698 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -205,17 +205,16 @@ void CDisasm::stepInto() } CtrlDisAsmView *ptr = DisAsmView(); + ptr->setDontRedraw(true); lastTicks_ = CoreTiming::GetTicks(); u32 stepSize = ptr->getInstructionSizeAt(cpu->GetPC()); u32 newAddress = Core_PerformStep(cpu, CPUStepType::Into, stepSize); - ptr->scrollStepping(newAddress); Sleep(1); - ptr->gotoPC(); + ptr->scrollStepping(newAddress); + ptr->gotoAddr(newAddress); UpdateDialog(); - threadList->reloadThreads(); - stackTraceView->loadStackTrace(); } void CDisasm::stepOver() @@ -225,24 +224,19 @@ void CDisasm::stepOver() } CtrlDisAsmView *ptr = DisAsmView(); + ptr->setDontRedraw(true); lastTicks_ = CoreTiming::GetTicks(); - // Not really sure why this is needed here. - ptr->setDontRedraw(true); - - // If the current PC is on a breakpoint, the user doesn't want to do nothing. - u32 currentPc = cpu->GetPC(); - u32 stepSize = ptr->getInstructionSizeAt(currentPc); - u32 breakpointAddress = Core_PerformStep(cpu, CPUStepType::Over, stepSize); + u32 stepSize = ptr->getInstructionSizeAt(cpu->GetPC()); + u32 newAddress = Core_PerformStep(cpu, CPUStepType::Over, stepSize); Sleep(1); - ptr->scrollStepping(breakpointAddress); - ptr->gotoAddr(breakpointAddress); + ptr->scrollStepping(newAddress); + ptr->gotoAddr(newAddress); UpdateDialog(); } void CDisasm::stepOut() { - auto memLock = Memory::Lock(); if (!PSP_IsInited()) return; @@ -250,10 +244,12 @@ void CDisasm::stepOut() { ptr->setDontRedraw(true); lastTicks_ = CoreTiming::GetTicks(); - u32 breakpointAddress = Core_PerformStep(cpu, CPUStepType::Out, 0); + u32 stepSize = ptr->getInstructionSizeAt(cpu->GetPC()); + u32 newAddress = Core_PerformStep(cpu, CPUStepType::Out, stepSize); Sleep(1); - ptr->gotoAddr(breakpointAddress); + ptr->scrollStepping(newAddress); + ptr->gotoAddr(newAddress); UpdateDialog(); }