diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/MemoryAccessCommandPacket.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/MemoryAccessCommandPacket.hpp index 91c9c6b1..984fc0e0 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/MemoryAccessCommandPacket.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/MemoryAccessCommandPacket.hpp @@ -22,7 +22,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets class MemoryAccessCommandPacket: public Bloom::DebugServer::Gdb::CommandPackets::CommandPacket { public: - explicit MemoryAccessCommandPacket(const std::vector& rawPacket) + explicit MemoryAccessCommandPacket(const RawPacketType& rawPacket) : CommandPacket(rawPacket) {}; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp index f645f398..485cbf13 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp @@ -13,7 +13,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using Exceptions::Exception; - ReadMemory::ReadMemory(const std::vector& rawPacket) + ReadMemory::ReadMemory(const RawPacketType& rawPacket) : MemoryAccessCommandPacket(rawPacket) { if (this->data.size() < 4) { diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp index 8809f502..a2e22f81 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp @@ -29,7 +29,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets */ std::uint32_t bytes = 0; - explicit ReadMemory(const std::vector& rawPacket); + explicit ReadMemory(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp index 142f72b2..b888942f 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp @@ -13,7 +13,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using namespace Bloom::Exceptions; - WriteMemory::WriteMemory(const std::vector& rawPacket) + WriteMemory::WriteMemory(const RawPacketType& rawPacket) : MemoryAccessCommandPacket(rawPacket) { if (this->data.size() < 4) { diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp index 02263c0a..581d4637 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp @@ -29,7 +29,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets */ Targets::TargetMemoryBuffer buffer; - explicit WriteMemory(const std::vector& rawPacket); + explicit WriteMemory(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp b/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp index 64167973..2ccb2b6d 100644 --- a/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp +++ b/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp @@ -36,7 +36,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets class CommandPacket: public Packet { public: - explicit CommandPacket(const std::vector& rawPacket): Packet(rawPacket) {} + explicit CommandPacket(const RawPacketType& rawPacket): Packet(rawPacket) {} /** * Should handle the command for the current active debug session. diff --git a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp index c640826a..2621b957 100644 --- a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp +++ b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp @@ -10,7 +10,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using ResponsePackets::ErrorResponsePacket; using Exceptions::Exception; - ContinueExecution::ContinueExecution(const std::vector& rawPacket) + ContinueExecution::ContinueExecution(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() > 1) { diff --git a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp index baafc027..c7f7f496 100644 --- a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp +++ b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp @@ -24,7 +24,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::optional fromProgramCounter; - explicit ContinueExecution(const std::vector& rawPacket); + explicit ContinueExecution(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp b/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp index f7c96870..fdc1cf70 100644 --- a/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp +++ b/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp @@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets class InterruptExecution: public CommandPacket { public: - explicit InterruptExecution(const std::vector& rawPacket): CommandPacket(rawPacket) {} + explicit InterruptExecution(const RawPacketType& rawPacket): CommandPacket(rawPacket) {} void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/Monitor.cpp b/src/DebugServer/Gdb/CommandPackets/Monitor.cpp index f38af34d..2004a775 100644 --- a/src/DebugServer/Gdb/CommandPackets/Monitor.cpp +++ b/src/DebugServer/Gdb/CommandPackets/Monitor.cpp @@ -8,7 +8,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets { using ResponsePackets::EmptyResponsePacket; - Monitor::Monitor(const std::vector& rawPacket) + Monitor::Monitor(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() > 6) { diff --git a/src/DebugServer/Gdb/CommandPackets/Monitor.hpp b/src/DebugServer/Gdb/CommandPackets/Monitor.hpp index 537f76d8..543f6d44 100644 --- a/src/DebugServer/Gdb/CommandPackets/Monitor.hpp +++ b/src/DebugServer/Gdb/CommandPackets/Monitor.hpp @@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::string command; - explicit Monitor(const std::vector& rawPacket); + explicit Monitor(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp index 780a51cd..9756ea50 100644 --- a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp +++ b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp @@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - ReadRegisters::ReadRegisters(const std::vector& rawPacket) + ReadRegisters::ReadRegisters(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() >= 2 && this->data.front() == 'p') { diff --git a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp index 2c314165..f37bffe8 100644 --- a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp +++ b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp @@ -25,7 +25,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::optional registerNumber; - explicit ReadRegisters(const std::vector& rawPacket); + explicit ReadRegisters(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp index 5261e492..01695ab9 100644 --- a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp +++ b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - RemoveBreakpoint::RemoveBreakpoint(const std::vector& rawPacket) + RemoveBreakpoint::RemoveBreakpoint(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() < 6) { diff --git a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp index aaa777c5..7d2a4cdf 100644 --- a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp +++ b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp @@ -26,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::uint32_t address = 0; - explicit RemoveBreakpoint(const std::vector& rawPacket); + explicit RemoveBreakpoint(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp index 091a078a..f9b07afa 100644 --- a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp +++ b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - SetBreakpoint::SetBreakpoint(const std::vector& rawPacket) + SetBreakpoint::SetBreakpoint(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() < 6) { diff --git a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp index b9331388..a123e840 100644 --- a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp +++ b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp @@ -26,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::uint32_t address = 0; - explicit SetBreakpoint(const std::vector& rawPacket); + explicit SetBreakpoint(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp b/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp index dbd100ee..297c4848 100644 --- a/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp +++ b/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp @@ -11,7 +11,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - StepExecution::StepExecution(const std::vector& rawPacket) + StepExecution::StepExecution(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() > 1) { diff --git a/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp b/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp index 832af8fb..f5d67e22 100644 --- a/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp +++ b/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::optional fromProgramCounter; - explicit StepExecution(const std::vector& rawPacket); + explicit StepExecution(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp index b700e33d..3e2a7a66 100644 --- a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp +++ b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Bloom::Exceptions::Exception; using Gdb::Exceptions::ClientNotSupported; - SupportedFeaturesQuery::SupportedFeaturesQuery(const std::vector& rawPacket) + SupportedFeaturesQuery::SupportedFeaturesQuery(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { /* diff --git a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp index 6b345de9..8772fb65 100644 --- a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp +++ b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp @@ -22,7 +22,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets class SupportedFeaturesQuery: public CommandPacket { public: - explicit SupportedFeaturesQuery(const std::vector& rawPacket); + explicit SupportedFeaturesQuery(const RawPacketType& rawPacket); [[nodiscard]] bool isFeatureSupported(const Feature& feature) const { return this->supportedFeatures.find(feature) != this->supportedFeatures.end(); diff --git a/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp b/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp index 48b0afe6..8b5dc25c 100644 --- a/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp +++ b/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp @@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - WriteRegister::WriteRegister(const std::vector& rawPacket) + WriteRegister::WriteRegister(const RawPacketType& rawPacket) : CommandPacket(rawPacket) { // The P packet updates a single register diff --git a/src/DebugServer/Gdb/CommandPackets/WriteRegister.hpp b/src/DebugServer/Gdb/CommandPackets/WriteRegister.hpp index ec543f43..2c978a09 100644 --- a/src/DebugServer/Gdb/CommandPackets/WriteRegister.hpp +++ b/src/DebugServer/Gdb/CommandPackets/WriteRegister.hpp @@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets int registerNumber = 0; std::vector registerValue; - explicit WriteRegister(const std::vector& rawPacket); + explicit WriteRegister(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/Packet.hpp b/src/DebugServer/Gdb/Packet.hpp index 8f8d50c4..f8b29c45 100644 --- a/src/DebugServer/Gdb/Packet.hpp +++ b/src/DebugServer/Gdb/Packet.hpp @@ -45,7 +45,7 @@ namespace Bloom::DebugServer::Gdb * * @return */ - [[nodiscard]] std::vector toRawPacket() const { + [[nodiscard]] RawPacketType toRawPacket() const { std::vector packet = {'$'}; auto data = this->getData(); diff --git a/src/DebugServer/Gdb/README.md b/src/DebugServer/Gdb/README.md index cf087cf7..9d27b10d 100644 --- a/src/DebugServer/Gdb/README.md +++ b/src/DebugServer/Gdb/README.md @@ -51,7 +51,7 @@ public: */ std::uint32_t address = 0; - explicit SetBreakpoint(const std::vector& rawPacket); + explicit SetBreakpoint(const RawPacketType& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; };