diff --git a/src/DebugServer/DebugServerComponent.cpp b/src/DebugServer/DebugServerComponent.cpp index 335f1103..ee1bd148 100644 --- a/src/DebugServer/DebugServerComponent.cpp +++ b/src/DebugServer/DebugServerComponent.cpp @@ -88,6 +88,8 @@ namespace Bloom::DebugServer Logger::info("Shutting down DebugServer"); this->server->close(); this->setThreadStateAndEmitEvent(ThreadState::STOPPED); + + this->eventListener->setInterruptEventNotifier(nullptr); EventManager::deregisterListener(this->eventListener->getId()); } diff --git a/src/DebugServer/Gdb/Connection.cpp b/src/DebugServer/Gdb/Connection.cpp index d49e384e..2f939b65 100644 --- a/src/DebugServer/Gdb/Connection.cpp +++ b/src/DebugServer/Gdb/Connection.cpp @@ -1,7 +1,7 @@ #include "Connection.hpp" #include -#include +#include #include #include diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.cpp b/src/DebugServer/Gdb/GdbRspDebugServer.cpp index be6d11b3..ede0595e 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.cpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.cpp @@ -1,6 +1,7 @@ #include "GdbRspDebugServer.hpp" #include +#include #include "src/Logger/Logger.hpp" @@ -42,7 +43,7 @@ namespace Bloom::DebugServer::Gdb , eventListener(eventListener) , interruptEventNotifier(eventListener.getInterruptEventNotifier()) { - assert(this->interruptEventNotifier != nullptr && this->interruptEventNotifier->isInitialised()); + assert(this->interruptEventNotifier != nullptr); } void GdbRspDebugServer::init() { diff --git a/src/EventManager/EventListener.cpp b/src/EventManager/EventListener.cpp index d902f687..7b9e850b 100644 --- a/src/EventManager/EventListener.cpp +++ b/src/EventManager/EventListener.cpp @@ -19,7 +19,7 @@ namespace Bloom eventQueueByType[event->getType()].push(std::move(event)); this->eventQueueByEventTypeCV.notify_all(); - if (this->interruptEventNotifier != nullptr && this->interruptEventNotifier->isInitialised()) { + if (this->interruptEventNotifier != nullptr) { this->interruptEventNotifier->notify(); } } diff --git a/src/TargetController/TargetControllerConsole.hpp b/src/TargetController/TargetControllerConsole.hpp index 60c1546b..2c2f8b40 100644 --- a/src/TargetController/TargetControllerConsole.hpp +++ b/src/TargetController/TargetControllerConsole.hpp @@ -15,6 +15,8 @@ #include "src/Targets/TargetState.hpp" #include "src/Targets/TargetPinDescriptor.hpp" +#include "src/Exceptions/Exception.hpp" + namespace Bloom { /**