Fixed stale program counter bug
This commit is contained in:
@@ -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);
|
emit this->insightSignals->targetStateUpdated(event.newState, event.previousState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1407,6 +1407,11 @@ namespace TargetController
|
|||||||
|
|
||||||
std::unique_ptr<Response> TargetControllerComponent::handleSetProgramCounter(SetTargetProgramCounter& command) {
|
std::unique_ptr<Response> TargetControllerComponent::handleSetProgramCounter(SetTargetProgramCounter& command) {
|
||||||
this->target->setProgramCounter(command.address);
|
this->target->setProgramCounter(command.address);
|
||||||
|
|
||||||
|
auto newState = *(this->targetState);
|
||||||
|
newState.programCounter = this->target->getProgramCounter();
|
||||||
|
this->updateTargetState(newState);
|
||||||
|
|
||||||
return std::make_unique<Response>();
|
return std::make_unique<Response>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user