Fixed stale program counter bug

This commit is contained in:
Nav
2025-04-03 00:07:05 +01:00
parent 53e68c3246
commit 33776a41cd
2 changed files with 5 additions and 4 deletions

View File

@@ -186,10 +186,6 @@ void Insight::onTargetStateChangedEvent(const Events::TargetStateChanged& event)
}
}
if (event.previousState.executionState == event.newState.executionState) {
return;
}
emit this->insightSignals->targetStateUpdated(event.newState, event.previousState);
}

View File

@@ -1407,6 +1407,11 @@ namespace TargetController
std::unique_ptr<Response> TargetControllerComponent::handleSetProgramCounter(SetTargetProgramCounter& command) {
this->target->setProgramCounter(command.address);
auto newState = *(this->targetState);
newState.programCounter = this->target->getProgramCounter();
this->updateTargetState(newState);
return std::make_unique<Response>();
}