Moved GDB supported feature set to DebugSession object

This commit is contained in:
Nav
2022-05-14 22:38:49 +01:00
parent 39d2bb7c5a
commit 6a4bf89706
5 changed files with 55 additions and 8 deletions

View File

@@ -146,7 +146,11 @@ namespace Bloom::DebugServer::Gdb
Logger::info("Accepted GDP RSP connection from " + connection->getIpAddress());
this->activeDebugSession.emplace(
DebugSession(std::move(connection.value()), this->getGdbTargetDescriptor())
DebugSession(
std::move(connection.value()),
this->getSupportedFeatures(),
this->getGdbTargetDescriptor()
)
);
EventManager::triggerEvent(std::make_shared<Events::DebugSessionStarted>());
@@ -325,6 +329,12 @@ namespace Bloom::DebugServer::Gdb
return std::make_unique<CommandPacket>(rawPacket);
}
std::set<std::pair<Feature, std::optional<std::string>>> GdbRspDebugServer::getSupportedFeatures() {
return {
{Feature::SOFTWARE_BREAKPOINTS, std::nullopt},
};
}
void GdbRspDebugServer::terminateActiveDebugSession() {
if (!this->activeDebugSession.has_value()) {
return;