From 513b0955ac659ffb32493eadbf665bf5c6ac5c91 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 2 Feb 2025 16:16:37 +0000 Subject: [PATCH] Dropped automatic resuming of target execution at the end of debug sessions --- .../TargetControllerComponent.cpp | 15 --------------- .../TargetControllerComponent.hpp | 7 ------- 2 files changed, 22 deletions(-) diff --git a/src/TargetController/TargetControllerComponent.cpp b/src/TargetController/TargetControllerComponent.cpp index 87d77ff4..aa2e05ca 100644 --- a/src/TargetController/TargetControllerComponent.cpp +++ b/src/TargetController/TargetControllerComponent.cpp @@ -282,10 +282,6 @@ namespace TargetController std::bind(&TargetControllerComponent::onShutdownTargetControllerEvent, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( - std::bind(&TargetControllerComponent::onDebugSessionFinishedEvent, this, std::placeholders::_1) - ); - this->acquireHardware(); this->targetState = std::make_unique( @@ -1193,17 +1189,6 @@ namespace TargetController this->shutdown(); } - void TargetControllerComponent::onDebugSessionFinishedEvent(const DebugSessionFinished&) { - if (this->state != TargetControllerState::ACTIVE) { - return; - } - - if (this->target->getExecutionState() != TargetExecutionState::RUNNING) { - this->target->run(std::nullopt); - this->refreshExecutionState(); - } - } - std::unique_ptr TargetControllerComponent::handleStartAtomicSession(StartAtomicSession& command) { this->startAtomicSession(); return std::make_unique(this->activeAtomicSession->id); diff --git a/src/TargetController/TargetControllerComponent.hpp b/src/TargetController/TargetControllerComponent.hpp index 1895744a..afdb9cf5 100644 --- a/src/TargetController/TargetControllerComponent.hpp +++ b/src/TargetController/TargetControllerComponent.hpp @@ -348,13 +348,6 @@ namespace TargetController */ void onShutdownTargetControllerEvent(const Events::ShutdownTargetController& event); - /** - * Will simply kick off execution on the target. - * - * @param event - */ - void onDebugSessionFinishedEvent(const Events::DebugSessionFinished& event); - // Command handlers std::unique_ptr handleStartAtomicSession(Commands::StartAtomicSession& command); std::unique_ptr handleEndAtomicSession(Commands::EndAtomicSession& command);