Created new ServerInterface class and refactored the AVR GDB RSP debug server into an implementation of ServerInterface

This commit is contained in:
Nav
2022-03-27 18:32:13 +01:00
parent 5d3211dc68
commit 934c4b2820
9 changed files with 159 additions and 132 deletions

View File

@@ -10,7 +10,7 @@
#include "src/Helpers/Thread.hpp"
#include "src/TargetController/TargetController.hpp"
#include "src/DebugServers/GdbRsp/AvrGdb/AvrGdbRsp.hpp"
#include "src/DebugServers/DebugServer.hpp"
#include "src/Insight/Insight.hpp"
#include "src/SignalHandler/SignalHandler.hpp"
@@ -37,29 +37,6 @@ namespace Bloom
explicit Application() = default;
/**
* This mapping is used to map debug server names from project configuration files to polymorphic instances of
* the DebugServer class.
*
* See Application::startDebugServer() for more on this.
*
* @return
*/
auto getSupportedDebugServers() {
return std::map<std::string, std::function<std::unique_ptr<DebugServers::DebugServer>()>> {
{
"avr-gdb-rsp",
[this] () -> std::unique_ptr<DebugServers::DebugServer> {
return std::make_unique<DebugServers::Gdb::AvrGdb::AvrGdbRsp>(
this->projectConfig.value(),
this->environmentConfig.value(),
this->debugServerConfig.value()
);
}
},
};
};
/**
* Main entry-point for the Bloom program.
*