From 01d52bb13020e1b000fc8528e164962502dbce6e Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 31 Mar 2022 21:41:03 +0100 Subject: [PATCH] Tidying --- src/DebugServer/DebugServerComponent.cpp | 1 + src/DebugServer/DebugServerComponent.hpp | 6 +----- src/DebugServer/ServerInterface.hpp | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/DebugServer/DebugServerComponent.cpp b/src/DebugServer/DebugServerComponent.cpp index 0badb1f6..265823f2 100644 --- a/src/DebugServer/DebugServerComponent.cpp +++ b/src/DebugServer/DebugServerComponent.cpp @@ -26,6 +26,7 @@ namespace Bloom::DebugServer this->server->run(); this->eventListener->dispatchCurrentEvents(); } + } catch (const std::exception& exception) { Logger::error("DebugServer fatal error: " + std::string(exception.what())); } diff --git a/src/DebugServer/DebugServerComponent.hpp b/src/DebugServer/DebugServerComponent.hpp index 974fafd3..594cc71b 100644 --- a/src/DebugServer/DebugServerComponent.hpp +++ b/src/DebugServer/DebugServerComponent.hpp @@ -21,12 +21,8 @@ namespace Bloom::DebugServer { /** * The DebugServer exposes the connected target to third-party debugging software such as IDEs. - * The DebugServer runs on a dedicated thread which is kicked off shortly after the TargetController has been - * started. * - * All supported DebugServers should be derived from this class. - * - * Bloom currently only supports one DebugServer - the GdbRspDebugServer. + * See documentation in src/DebugServer/README.md for more. */ class DebugServerComponent: public Thread { diff --git a/src/DebugServer/ServerInterface.hpp b/src/DebugServer/ServerInterface.hpp index 4e3ec933..b030e8a6 100644 --- a/src/DebugServer/ServerInterface.hpp +++ b/src/DebugServer/ServerInterface.hpp @@ -23,7 +23,9 @@ namespace Bloom::DebugServer * Called repeatedly in an infinite loop when the DebugServerComponent is running. The server should serve * from here. * - * This function should return when any blocking operation is interrupted via an EventNotifier instance. + * For servicing DebugServer events, the implementation should either service them here or return from here + * upon an event being triggered. Returning from this function will allow DebugServerComponent::run() to + * process any pending events. See the DebugServer documentation in src/DebugServer/README.md for more. */ virtual void run() = 0;