From e19ad1f359fae8628501aa685c515c87b8a57b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 3 Nov 2024 18:11:33 +0100 Subject: [PATCH] Remove return value from Core_PerformStep --- Core/Core.cpp | 12 ++++++------ Core/Core.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Core/Core.cpp b/Core/Core.cpp index cf4165ebf1..bac21f14db 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -239,7 +239,7 @@ void Core_UpdateSingleStep() { } // See comment in header. -u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { +void Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { switch (stepType) { case CPUStepType::Into: { @@ -250,7 +250,7 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { for (int i = 0; i < (newAddress - currentPc) / 4; i++) { Core_DoSingleStep(); } - return cpu->GetPC(); + return; } case CPUStepType::Over: { @@ -280,7 +280,7 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { CBreakPoints::AddBreakPoint(breakpointAddress, true); Core_Resume(); - return breakpointAddress; + break; } case CPUStepType::Out: { @@ -299,7 +299,7 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { auto frames = MIPSStackWalk::Walk(cpu->GetPC(), cpu->GetRegValue(0, 31), cpu->GetRegValue(0, 29), entry, stackTop); if (frames.size() < 2) { // Failure. PC not moving. - return cpu->GetPC(); + return; } u32 breakpointAddress = frames[1].pc; @@ -308,11 +308,11 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { CBreakPoints::SetSkipFirst(currentMIPS->pc); CBreakPoints::AddBreakPoint(breakpointAddress, true); Core_Resume(); - return breakpointAddress; + break; } default: // Not yet implemented - return cpu->GetPC(); + break; } } diff --git a/Core/Core.h b/Core/Core.h index a3cc091b45..306d522819 100644 --- a/Core/Core.h +++ b/Core/Core.h @@ -56,8 +56,8 @@ void Core_Resume(); // Handles more advanced step types (used by the debugger). // stepSize is to support stepping through compound instructions like fused lui+ladd (li). // Yes, our disassembler does support those. -// Returns the new address. -uint32_t Core_PerformStep(DebugInterface *mips, CPUStepType stepType, int stepSize); +// Doesn't return the new address, as that's just mips->getPC(). +void Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize); // Refactor. void Core_DoSingleStep();