2022-03-19 15:15:36 +00:00
|
|
|
#include "GdbDebugServerConfig.hpp"
|
|
|
|
|
|
2022-03-31 16:05:39 +01:00
|
|
|
namespace Bloom::DebugServer::Gdb
|
2022-03-19 15:15:36 +00:00
|
|
|
{
|
|
|
|
|
GdbDebugServerConfig::GdbDebugServerConfig(const DebugServerConfig& debugServerConfig)
|
|
|
|
|
: DebugServerConfig(debugServerConfig)
|
|
|
|
|
{
|
|
|
|
|
if (debugServerConfig.jsonObject.contains("ipAddress")) {
|
|
|
|
|
this->listeningAddress = debugServerConfig.jsonObject.value("ipAddress").toString().toStdString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (debugServerConfig.jsonObject.contains("port")) {
|
|
|
|
|
const auto portValue = debugServerConfig.jsonObject.value("port");
|
|
|
|
|
this->listeningPortNumber = static_cast<std::uint16_t>(
|
|
|
|
|
portValue.isString() ? portValue.toString().toInt(nullptr, 10) : portValue.toInt()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|