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.
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;
}
}

View File

@ -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();