Remove return value from Core_PerformStep

This commit is contained in:
Henrik Rydgård 2024-11-03 18:11:33 +01:00
parent a703b9a2af
commit e19ad1f359
2 changed files with 8 additions and 8 deletions

View File

@ -239,7 +239,7 @@ void Core_UpdateSingleStep() {
} }
// See comment in header. // See comment in header.
u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) { void Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) {
switch (stepType) { switch (stepType) {
case CPUStepType::Into: 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++) { for (int i = 0; i < (newAddress - currentPc) / 4; i++) {
Core_DoSingleStep(); Core_DoSingleStep();
} }
return cpu->GetPC(); return;
} }
case CPUStepType::Over: case CPUStepType::Over:
{ {
@ -280,7 +280,7 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) {
CBreakPoints::AddBreakPoint(breakpointAddress, true); CBreakPoints::AddBreakPoint(breakpointAddress, true);
Core_Resume(); Core_Resume();
return breakpointAddress; break;
} }
case CPUStepType::Out: 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); auto frames = MIPSStackWalk::Walk(cpu->GetPC(), cpu->GetRegValue(0, 31), cpu->GetRegValue(0, 29), entry, stackTop);
if (frames.size() < 2) { if (frames.size() < 2) {
// Failure. PC not moving. // Failure. PC not moving.
return cpu->GetPC(); return;
} }
u32 breakpointAddress = frames[1].pc; u32 breakpointAddress = frames[1].pc;
@ -308,11 +308,11 @@ u32 Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize) {
CBreakPoints::SetSkipFirst(currentMIPS->pc); CBreakPoints::SetSkipFirst(currentMIPS->pc);
CBreakPoints::AddBreakPoint(breakpointAddress, true); CBreakPoints::AddBreakPoint(breakpointAddress, true);
Core_Resume(); Core_Resume();
return breakpointAddress; break;
} }
default: default:
// Not yet implemented // Not yet implemented
return cpu->GetPC(); break;
} }
} }

View File

@ -56,8 +56,8 @@ void Core_Resume();
// Handles more advanced step types (used by the debugger). // Handles more advanced step types (used by the debugger).
// stepSize is to support stepping through compound instructions like fused lui+ladd (li). // stepSize is to support stepping through compound instructions like fused lui+ladd (li).
// Yes, our disassembler does support those. // Yes, our disassembler does support those.
// Returns the new address. // Doesn't return the new address, as that's just mips->getPC().
uint32_t Core_PerformStep(DebugInterface *mips, CPUStepType stepType, int stepSize); void Core_PerformStep(DebugInterface *cpu, CPUStepType stepType, int stepSize);
// Refactor. // Refactor.
void Core_DoSingleStep(); void Core_DoSingleStep();