diff --git a/src/DebugServer/Gdb/GdbDebugServerConfig.cpp b/src/DebugServer/Gdb/GdbDebugServerConfig.cpp index bd07ca56..3c8ab47c 100644 --- a/src/DebugServer/Gdb/GdbDebugServerConfig.cpp +++ b/src/DebugServer/Gdb/GdbDebugServerConfig.cpp @@ -20,9 +20,15 @@ namespace Bloom::DebugServer::Gdb } if (debugServerConfig.debugServerNode["port"]) { - this->listeningPortNumber = static_cast( - debugServerConfig.debugServerNode["port"].as() - ); + if (YamlUtilities::isType(debugServerConfig.debugServerNode["port"])) { + this->listeningPortNumber = debugServerConfig.debugServerNode["port"].as(); + + } else { + Logger::error( + "Invalid GDB debug server config parameter ('port') provided - value must be castable to a 16-bit " + "unsigned integer. The parameter will be ignored." + ); + } } } }