Renamed Packet::dataToHex() member function

This commit is contained in:
Nav
2022-04-06 16:45:57 +01:00
parent bd73051003
commit 203b6ff86f
4 changed files with 4 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
this->bytes
);
auto hexMemoryBuffer = Packet::dataToHex(memoryBuffer);
auto hexMemoryBuffer = Packet::toHex(memoryBuffer);
debugSession.connection.writePacket(
ResponsePacket(std::vector<unsigned char>(hexMemoryBuffer.begin(), hexMemoryBuffer.end()))
);

View File

@@ -84,7 +84,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
registers.insert(registers.end(), reg.value.begin(), reg.value.end());
}
auto responseRegisters = Packet::dataToHex(registers);
auto responseRegisters = Packet::toHex(registers);
debugSession.connection.writePacket(
ResponsePacket(std::vector<unsigned char>(responseRegisters.begin(), responseRegisters.end()))
);

View File

@@ -90,7 +90,7 @@ namespace Bloom::DebugServer::Gdb
* @param data
* @return
*/
static std::string dataToHex(const std::vector<unsigned char>& data) {
static std::string toHex(const std::vector<unsigned char>& data) {
std::stringstream stream;
stream << std::hex << std::setfill('0');

View File

@@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb::ResponsePackets
explicit TargetStopped(Signal signal): signal(signal) {}
[[nodiscard]] std::vector<unsigned char> getData() const override {
std::string output = "T" + Packet::dataToHex({static_cast<unsigned char>(this->signal)});
std::string output = "T" + Packet::toHex(std::vector({static_cast<unsigned char>(this->signal)}));
if (this->stopReason.has_value()) {
auto stopReasonMapping = getStopReasonToNameMapping();