Tidied GDB Connection class and made it adhere to the RAII approach

This commit is contained in:
Nav
2022-03-29 14:54:49 +01:00
parent a743381d8c
commit 97776f12e0
4 changed files with 72 additions and 54 deletions

View File

@@ -134,7 +134,6 @@ namespace Bloom::DebugServers::Gdb
return;
}
connection->accept(this->serverSocketFileDescriptor);
Logger::info("Accepted GDP RSP connection from " + connection->getIpAddress());
this->activeDebugSession.emplace(
@@ -206,7 +205,7 @@ namespace Bloom::DebugServers::Gdb
return std::nullopt;
}
return std::make_optional<Connection>(*(this->interruptEventNotifier));
return std::make_optional<Connection>(this->serverSocketFileDescriptor, *(this->interruptEventNotifier));
}
std::unique_ptr<CommandPacket> GdbRspDebugServer::waitForCommandPacket() {