From 2c58103208bddc6e2b25331d4c7a3cba6d6a75e0 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 1 May 2022 19:40:50 +0100 Subject: [PATCH] Used new TargetControllerConsole::getProgramCounter() member function to retrieve the PC upon a TargetReset event being fired (as opposed to just hard-coding the PC) --- src/Insight/InsightWorker/InsightWorker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Insight/InsightWorker/InsightWorker.cpp b/src/Insight/InsightWorker/InsightWorker.cpp index abe593e6..bea72429 100644 --- a/src/Insight/InsightWorker/InsightWorker.cpp +++ b/src/Insight/InsightWorker/InsightWorker.cpp @@ -121,10 +121,10 @@ namespace Bloom } void InsightWorker::onTargetResetEvent(const Events::TargetReset& event) { - // TODO: Pull PC from target. This will be done as part of the TC refactor (https://github.com/navnavnav/Bloom/issues/25) this->lastTargetState = TargetState::STOPPED; + emit this->targetStateUpdated(TargetState::RUNNING); emit this->targetStateUpdated(TargetState::STOPPED); - emit this->targetProgramCounterUpdated(0); + emit this->targetProgramCounterUpdated(this->targetControllerConsole.getProgramCounter()); } void InsightWorker::onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event) {