Moved toHex functions to String helper class

This commit is contained in:
Nav
2023-01-21 13:37:56 +00:00
parent 662806769e
commit 6b4d3ecb26
12 changed files with 70 additions and 51 deletions

View File

@@ -7,6 +7,8 @@
#include "src/DebugServer/Gdb/Signal.hpp"
#include "src/DebugServer/Gdb/StopReason.hpp"
#include "src/Helpers/String.hpp"
namespace Bloom::DebugServer::Gdb::ResponsePackets
{
/**
@@ -23,7 +25,7 @@ namespace Bloom::DebugServer::Gdb::ResponsePackets
: signal(signal)
, stopReason(stopReason)
{
std::string packetData = "T" + Packet::toHex(std::vector({static_cast<unsigned char>(this->signal)}));
std::string packetData = "T" + String::toHex(std::vector({static_cast<unsigned char>(this->signal)}));
if (this->stopReason.has_value()) {
static const auto stopReasonMapping = getStopReasonToNameMapping();