diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.cpp b/src/DebugServer/Gdb/GdbRspDebugServer.cpp index f249fc90..82502318 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.cpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.cpp @@ -121,10 +121,6 @@ namespace Bloom::DebugServer::Gdb Logger::info("GDB RSP address: " + this->debugServerConfig.listeningAddress); Logger::info("GDB RSP port: " + std::to_string(this->debugServerConfig.listeningPortNumber)); - this->eventListener.registerCallbackForEventType( - std::bind(&GdbRspDebugServer::onTargetControllerStateChanged, this, std::placeholders::_1) - ); - this->eventListener.registerCallbackForEventType( std::bind(&GdbRspDebugServer::onTargetExecutionStopped, this, std::placeholders::_1) ); @@ -343,13 +339,6 @@ namespace Bloom::DebugServer::Gdb }; } - void GdbRspDebugServer::onTargetControllerStateChanged(const Events::TargetControllerStateChanged& event) { - if (event.state == TargetControllerState::SUSPENDED && this->activeDebugSession.has_value()) { - Logger::warning("TargetController suspended unexpectedly - terminating debug session"); - this->activeDebugSession.reset(); - } - } - void GdbRspDebugServer::onTargetExecutionStopped(const Events::TargetExecutionStopped&) { try { if (this->activeDebugSession.has_value() && this->activeDebugSession->waitingForBreak) { diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.hpp b/src/DebugServer/Gdb/GdbRspDebugServer.hpp index 17ba2b8c..bcf42c32 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.hpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.hpp @@ -23,7 +23,6 @@ #include "Feature.hpp" #include "CommandPackets/CommandPacket.hpp" -#include "src/EventManager/Events/TargetControllerStateChanged.hpp" #include "src/EventManager/Events/TargetExecutionStopped.hpp" #include "src/EventManager/Events/TargetExecutionResumed.hpp" @@ -186,13 +185,6 @@ namespace Bloom::DebugServer::Gdb */ virtual const TargetDescriptor& getGdbTargetDescriptor() = 0; - /** - * Responds to any unexpected TargetController state changes. - * - * @param event - */ - void onTargetControllerStateChanged(const Events::TargetControllerStateChanged& event); - /** * If the GDB client is currently waiting for the target execution to stop, this event handler will issue * a "stop reply" packet to the client once the target execution stops. diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index 256bddc8..6bcb2c7c 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -75,10 +75,6 @@ namespace Bloom Logger::info("Starting Insight"); this->setThreadState(ThreadState::STARTING); - this->eventListener.registerCallbackForEventType( - std::bind(&Insight::onTargetControllerStateChangedEvent, this, std::placeholders::_1) - ); - this->eventListener.registerCallbackForEventType( std::bind(&Insight::onTargetStoppedEvent, this, std::placeholders::_1) ); @@ -350,33 +346,6 @@ namespace Bloom ); } - void Insight::onTargetControllerStateChangedEvent(const Events::TargetControllerStateChanged& event) { - using TargetController::TargetControllerState; - - if (event.state == TargetControllerState::SUSPENDED) { - emit this->insightSignals->targetControllerSuspended(); - return; - } - - if (event.state == TargetControllerState::ACTIVE) { - const auto getTargetDescriptorTask = QSharedPointer( - new GetTargetDescriptor(), - &QObject::deleteLater - ); - - QObject::connect( - getTargetDescriptorTask.get(), - &GetTargetDescriptor::targetDescriptor, - this, - [this] (Targets::TargetDescriptor targetDescriptor) { - emit this->insightSignals->targetControllerResumed(targetDescriptor); - } - ); - - InsightWorker::queueTask(getTargetDescriptorTask); - } - } - void Insight::onProgrammingModeEnabledEvent(const Events::ProgrammingModeEnabled& event) { emit this->insightSignals->programmingModeEnabled(); } diff --git a/src/Insight/Insight.hpp b/src/Insight/Insight.hpp index 98b4d2a7..f19cfcbc 100644 --- a/src/Insight/Insight.hpp +++ b/src/Insight/Insight.hpp @@ -128,7 +128,6 @@ namespace Bloom void onTargetResetEvent(const Events::TargetReset& event); void onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event); void onTargetMemoryWrittenEvent(const Events::MemoryWrittenToTarget& event); - void onTargetControllerStateChangedEvent(const Events::TargetControllerStateChanged& event); void onProgrammingModeEnabledEvent(const Events::ProgrammingModeEnabled& event); void onProgrammingModeDisabledEvent(const Events::ProgrammingModeDisabled& event); }; diff --git a/src/Insight/InsightSignals.hpp b/src/Insight/InsightSignals.hpp index ada63890..95b3ac1c 100644 --- a/src/Insight/InsightSignals.hpp +++ b/src/Insight/InsightSignals.hpp @@ -37,8 +37,6 @@ namespace Bloom void targetReset(); void targetRegistersWritten(const Bloom::Targets::TargetRegisters& targetRegisters, const QDateTime& timestamp); void targetMemoryWritten(Bloom::Targets::TargetMemoryType memoryType, Targets::TargetMemoryAddressRange addressRange); - void targetControllerSuspended(); - void targetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor); void programmingModeEnabled(); void programmingModeDisabled(); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 2a642797..ecff277f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -260,18 +260,6 @@ namespace Bloom // InsightSignal connections auto* insightSignals = InsightSignals::instance(); - QObject::connect( - insightSignals, - &InsightSignals::targetControllerSuspended, - this, - &InsightWindow::onTargetControllerSuspended - ); - QObject::connect( - insightSignals, - &InsightSignals::targetControllerResumed, - this, - &InsightWindow::onTargetControllerResumed - ); QObject::connect( insightSignals, &InsightSignals::targetStateUpdated, @@ -905,19 +893,6 @@ namespace Bloom ); } - void InsightWindow::onTargetControllerSuspended() { - if (this->activated) { - this->deactivate(); - } - } - - void InsightWindow::onTargetControllerResumed(const TargetDescriptor& targetDescriptor) { - if (!this->activated) { - this->targetDescriptor = targetDescriptor; - this->activate(); - } - } - void InsightWindow::onTargetStateUpdate(TargetState newState) { this->targetState = newState; diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp index 18c87119..a6e4df1c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp @@ -128,8 +128,6 @@ namespace Bloom void adjustPanels(); void adjustMinimumSize(); - void onTargetControllerSuspended(); - void onTargetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor); void onTargetStateUpdate(Targets::TargetState newState); void refresh(); void refreshPinStates();