diff --git a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp index 4ee0e89f..a663424d 100644 --- a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp +++ b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp @@ -32,7 +32,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb } std::unique_ptr AvrGdbRsp::resolveCommandPacket( - const RawPacketType& rawPacket + const RawPacket& rawPacket ) { using AvrGdb::CommandPackets::ReadMemory; using AvrGdb::CommandPackets::WriteMemory; diff --git a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.hpp b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.hpp index 98ad84f7..d78800db 100644 --- a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.hpp +++ b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.hpp @@ -29,7 +29,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb } std::unique_ptr resolveCommandPacket( - const RawPacketType& rawPacket + const RawPacket& rawPacket ) override; std::set>> getSupportedFeatures() override ; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp index 6f0313b2..ccf58e88 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp @@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using namespace Bloom::Exceptions; - FlashDone::FlashDone(const RawPacketType& rawPacket) + FlashDone::FlashDone(const RawPacket& rawPacket) : CommandPacket(rawPacket) {} diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp index d7b1aa33..aee736c9 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp @@ -16,7 +16,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets class FlashDone: public Gdb::CommandPackets::CommandPacket { public: - explicit FlashDone(const RawPacketType& rawPacket); + explicit FlashDone(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp index bf3e5852..faa05ac6 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp @@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using namespace Bloom::Exceptions; - FlashErase::FlashErase(const RawPacketType& rawPacket) + FlashErase::FlashErase(const RawPacket& rawPacket) : CommandPacket(rawPacket) { const auto packetString = QString::fromLocal8Bit( diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp index 9dd4693d..d45141f0 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp @@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets std::uint32_t startAddress = 0; std::uint32_t bytes = 0; - explicit FlashErase(const RawPacketType& rawPacket); + explicit FlashErase(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp index f4483b89..b3a730e7 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp @@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using namespace Bloom::Exceptions; - FlashWrite::FlashWrite(const RawPacketType& rawPacket) + FlashWrite::FlashWrite(const RawPacket& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() < 15) { diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp index 83a2b8bc..9cef10bc 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp @@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets std::uint32_t startAddress = 0; Targets::TargetMemoryBuffer buffer; - explicit FlashWrite(const RawPacketType& rawPacket); + explicit FlashWrite(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp index 6c0d2cd8..754d6295 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp @@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using Exceptions::Exception; - ReadMemory::ReadMemory(const RawPacketType& rawPacket, const TargetDescriptor& gdbTargetDescriptor) + ReadMemory::ReadMemory(const RawPacket& rawPacket, const TargetDescriptor& gdbTargetDescriptor) : CommandPacket(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 92825a9f..92a9c536 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp @@ -32,7 +32,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets */ Targets::TargetMemorySize bytes = 0; - explicit ReadMemory(const RawPacketType& rawPacket, const Gdb::TargetDescriptor& gdbTargetDescriptor); + explicit ReadMemory(const RawPacket& rawPacket, const Gdb::TargetDescriptor& gdbTargetDescriptor); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp index f43794ec..5369c4e0 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp @@ -12,7 +12,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using Exceptions::Exception; - ReadMemoryMap::ReadMemoryMap(const RawPacketType& rawPacket) + ReadMemoryMap::ReadMemoryMap(const RawPacket& rawPacket) : CommandPacket(rawPacket) { if (this->data.size() < 26) { diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp index b200e49d..6aa40a2c 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp @@ -23,7 +23,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets */ std::uint32_t length = 0; - explicit ReadMemoryMap(const RawPacketType& rawPacket); + explicit ReadMemoryMap(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp index 0d91657d..2c2e7e09 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp @@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets using namespace Bloom::Exceptions; - WriteMemory::WriteMemory(const RawPacketType& rawPacket, const TargetDescriptor& gdbTargetDescriptor) + WriteMemory::WriteMemory(const RawPacket& rawPacket, const TargetDescriptor& gdbTargetDescriptor) : CommandPacket(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 cbacb4fd..ab89a79e 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp @@ -32,7 +32,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets */ Targets::TargetMemoryBuffer buffer; - explicit WriteMemory(const RawPacketType& rawPacket, const Gdb::TargetDescriptor& gdbTargetDescriptor); + explicit WriteMemory(const RawPacket& rawPacket, const Gdb::TargetDescriptor& gdbTargetDescriptor); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.cpp b/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.cpp index 4695992a..19c443a1 100644 --- a/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.cpp +++ b/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.cpp @@ -24,13 +24,13 @@ namespace Bloom::DebugServer::Gdb::AvrGdb this->loadRegisterMappings(); } - std::optional TargetDescriptor::getRegisterNumberFromTargetRegisterDescriptor( + std::optional TargetDescriptor::getRegisterNumberFromTargetRegisterDescriptor( const Targets::TargetRegisterDescriptor& registerDescriptor ) const { return this->targetRegisterDescriptorsByGdbNumber.valueAt(registerDescriptor); } - const RegisterDescriptor& TargetDescriptor::getRegisterDescriptorFromNumber(GdbRegisterNumberType number) const { + const RegisterDescriptor& TargetDescriptor::getRegisterDescriptorFromNumber(GdbRegisterNumber number) const { if (this->registerDescriptorsByGdbNumber.contains(number)) { return this->registerDescriptorsByGdbNumber.at(number); } @@ -40,7 +40,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb } const TargetRegisterDescriptor& TargetDescriptor::getTargetRegisterDescriptorFromNumber( - GdbRegisterNumberType number + GdbRegisterNumber number ) const { if (this->targetRegisterDescriptorsByGdbNumber.contains(number)) { return this->targetRegisterDescriptorsByGdbNumber.at(number); @@ -50,7 +50,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb + ") not mapped to any target register descriptor."); } - const std::vector& TargetDescriptor::getRegisterNumbers() const { + const std::vector& TargetDescriptor::getRegisterNumbers() const { return this->registerNumbers; } @@ -98,7 +98,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb ); // General purpose registers - GdbRegisterNumberType regNumber = 0; + GdbRegisterNumber regNumber = 0; for (const auto& descriptor : gpRegisterDescriptors) { this->registerDescriptorsByGdbNumber.insert(std::pair( regNumber, diff --git a/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.hpp b/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.hpp index 9ab7031b..7066f0b2 100644 --- a/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.hpp +++ b/src/DebugServer/Gdb/AvrGdb/TargetDescriptor.hpp @@ -9,8 +9,8 @@ namespace Bloom::DebugServer::Gdb::AvrGdb class TargetDescriptor: public DebugServer::Gdb::TargetDescriptor { public: - BiMap registerDescriptorsByGdbNumber = {}; - BiMap targetRegisterDescriptorsByGdbNumber = {}; + BiMap registerDescriptorsByGdbNumber = {}; + BiMap targetRegisterDescriptorsByGdbNumber = {}; explicit TargetDescriptor(const Targets::TargetDescriptor& targetDescriptor); @@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb * @param registerDescriptor * @return */ - std::optional getRegisterNumberFromTargetRegisterDescriptor( + std::optional getRegisterNumberFromTargetRegisterDescriptor( const Targets::TargetRegisterDescriptor& registerDescriptor ) const override; @@ -31,7 +31,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb * @param number * @return */ - const RegisterDescriptor& getRegisterDescriptorFromNumber(GdbRegisterNumberType number) const override; + const RegisterDescriptor& getRegisterDescriptorFromNumber(GdbRegisterNumber number) const override; /** * Should retrieve the mapped target register descriptor for a given GDB register number. @@ -40,13 +40,13 @@ namespace Bloom::DebugServer::Gdb::AvrGdb * @return */ const Targets::TargetRegisterDescriptor& getTargetRegisterDescriptorFromNumber( - GdbRegisterNumberType number + GdbRegisterNumber number ) const override; - const std::vector& getRegisterNumbers() const override; + const std::vector& getRegisterNumbers() const override; private: - std::vector registerNumbers = std::vector(35); + std::vector registerNumbers = std::vector(35); /** * For AVR targets, avr-gdb defines 35 registers in total: diff --git a/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp b/src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp index c96c3fdc..b8e22840 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 RawPacketType& rawPacket): Packet(rawPacket) {} + explicit CommandPacket(const RawPacket& 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 e33fad62..24a47250 100644 --- a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp +++ b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.cpp @@ -12,7 +12,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using ResponsePackets::ErrorResponsePacket; using Exceptions::Exception; - ContinueExecution::ContinueExecution(const RawPacketType& rawPacket) + ContinueExecution::ContinueExecution(const RawPacket& 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 75d4df89..2fa0c074 100644 --- a/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp +++ b/src/DebugServer/Gdb/CommandPackets/ContinueExecution.hpp @@ -26,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::optional fromProgramCounter; - explicit ContinueExecution(const RawPacketType& rawPacket); + explicit ContinueExecution(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/Detach.cpp b/src/DebugServer/Gdb/CommandPackets/Detach.cpp index c8a4ed47..b8aaa0f8 100644 --- a/src/DebugServer/Gdb/CommandPackets/Detach.cpp +++ b/src/DebugServer/Gdb/CommandPackets/Detach.cpp @@ -16,7 +16,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - Detach::Detach(const RawPacketType& rawPacket) + Detach::Detach(const RawPacket& rawPacket) : CommandPacket(rawPacket) {} diff --git a/src/DebugServer/Gdb/CommandPackets/Detach.hpp b/src/DebugServer/Gdb/CommandPackets/Detach.hpp index 6f547214..a002ab86 100644 --- a/src/DebugServer/Gdb/CommandPackets/Detach.hpp +++ b/src/DebugServer/Gdb/CommandPackets/Detach.hpp @@ -7,7 +7,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets class Detach: public CommandPacket { public: - explicit Detach(const RawPacketType& rawPacket); + explicit Detach(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp b/src/DebugServer/Gdb/CommandPackets/InterruptExecution.hpp index 840249e0..fa9cf3b2 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 RawPacketType& rawPacket): CommandPacket(rawPacket) {} + explicit InterruptExecution(const RawPacket& rawPacket): CommandPacket(rawPacket) {} void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/Monitor.cpp b/src/DebugServer/Gdb/CommandPackets/Monitor.cpp index f02f80aa..44485814 100644 --- a/src/DebugServer/Gdb/CommandPackets/Monitor.cpp +++ b/src/DebugServer/Gdb/CommandPackets/Monitor.cpp @@ -10,7 +10,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using ResponsePackets::EmptyResponsePacket; - Monitor::Monitor(const RawPacketType& rawPacket) + Monitor::Monitor(const RawPacket& 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 77c2e5c2..36e757d8 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 RawPacketType& rawPacket); + explicit Monitor(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp index dbd542b6..7007f09d 100644 --- a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp +++ b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.cpp @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - ReadRegisters::ReadRegisters(const RawPacketType& rawPacket) + ReadRegisters::ReadRegisters(const RawPacket& 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 a741aed9..5b88911c 100644 --- a/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp +++ b/src/DebugServer/Gdb/CommandPackets/ReadRegisters.hpp @@ -23,9 +23,9 @@ namespace Bloom::DebugServer::Gdb::CommandPackets * If the register number is not supplied (as is the case with "g" packets), the server is expected to respond * with values for all registers. */ - std::optional registerNumber; + std::optional registerNumber; - explicit ReadRegisters(const RawPacketType& rawPacket); + explicit ReadRegisters(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp index f30b628d..1e99d6a6 100644 --- a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp +++ b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.cpp @@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - RemoveBreakpoint::RemoveBreakpoint(const RawPacketType& rawPacket) + RemoveBreakpoint::RemoveBreakpoint(const RawPacket& 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 e88fd1f1..09403587 100644 --- a/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp +++ b/src/DebugServer/Gdb/CommandPackets/RemoveBreakpoint.hpp @@ -28,7 +28,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ Targets::TargetMemoryAddress address = 0; - explicit RemoveBreakpoint(const RawPacketType& rawPacket); + explicit RemoveBreakpoint(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp index 5ff4e1a9..9739a838 100644 --- a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp +++ b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.cpp @@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - SetBreakpoint::SetBreakpoint(const RawPacketType& rawPacket) + SetBreakpoint::SetBreakpoint(const RawPacket& 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 6dc1d444..e8fd6f5f 100644 --- a/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp +++ b/src/DebugServer/Gdb/CommandPackets/SetBreakpoint.hpp @@ -28,7 +28,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ Targets::TargetMemoryAddress address = 0; - explicit SetBreakpoint(const RawPacketType& rawPacket); + explicit SetBreakpoint(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp b/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp index ec9740ac..b26795a2 100644 --- a/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp +++ b/src/DebugServer/Gdb/CommandPackets/StepExecution.cpp @@ -13,7 +13,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - StepExecution::StepExecution(const RawPacketType& rawPacket) + StepExecution::StepExecution(const RawPacket& 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 27a7681d..dae751f1 100644 --- a/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp +++ b/src/DebugServer/Gdb/CommandPackets/StepExecution.hpp @@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets */ std::optional fromProgramCounter; - explicit StepExecution(const RawPacketType& rawPacket); + explicit StepExecution(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp index 2aac0e02..a4de96ac 100644 --- a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp +++ b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.cpp @@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Bloom::Exceptions::Exception; using Gdb::Exceptions::ClientNotSupported; - SupportedFeaturesQuery::SupportedFeaturesQuery(const RawPacketType& rawPacket) + SupportedFeaturesQuery::SupportedFeaturesQuery(const RawPacket& rawPacket) : CommandPacket(rawPacket) { /* diff --git a/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp b/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp index 5645fd4e..cd6f5d7f 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 RawPacketType& rawPacket); + explicit SupportedFeaturesQuery(const RawPacket& 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 6f2a98c7..49af7436 100644 --- a/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp +++ b/src/DebugServer/Gdb/CommandPackets/WriteRegister.cpp @@ -22,7 +22,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets using Exceptions::Exception; - WriteRegister::WriteRegister(const RawPacketType& rawPacket) + WriteRegister::WriteRegister(const RawPacket& 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 906d50a4..1c2a03c4 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 RawPacketType& rawPacket); + explicit WriteRegister(const RawPacket& rawPacket); void handle( DebugSession& debugSession, diff --git a/src/DebugServer/Gdb/Connection.cpp b/src/DebugServer/Gdb/Connection.cpp index f8c1b3c8..624f94f4 100644 --- a/src/DebugServer/Gdb/Connection.cpp +++ b/src/DebugServer/Gdb/Connection.cpp @@ -51,8 +51,8 @@ namespace Bloom::DebugServer::Gdb return std::string(ipAddress.data()); } - std::vector Connection::readRawPackets() { - std::vector output; + std::vector Connection::readRawPackets() { + std::vector output; const auto bytes = this->read(); @@ -71,7 +71,7 @@ namespace Bloom::DebugServer::Gdb } else if (byte == '$') { // Beginning of packet - RawPacketType rawPacket; + RawPacket rawPacket; rawPacket.push_back('$'); auto packetIndex = byteIndex; diff --git a/src/DebugServer/Gdb/Connection.hpp b/src/DebugServer/Gdb/Connection.hpp index b5a82535..6e6888e3 100644 --- a/src/DebugServer/Gdb/Connection.hpp +++ b/src/DebugServer/Gdb/Connection.hpp @@ -57,7 +57,7 @@ namespace Bloom::DebugServer::Gdb * * @return */ - std::vector readRawPackets(); + std::vector readRawPackets(); /** * Sends a response packet to the client. diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.cpp b/src/DebugServer/Gdb/GdbRspDebugServer.cpp index ed3181a9..94e55f3c 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.cpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.cpp @@ -254,7 +254,7 @@ namespace Bloom::DebugServer::Gdb return this->resolveCommandPacket(rawPackets.back()); } - std::unique_ptr GdbRspDebugServer::resolveCommandPacket(const RawPacketType& rawPacket) { + std::unique_ptr GdbRspDebugServer::resolveCommandPacket(const RawPacket& rawPacket) { if (rawPacket.size() == 5 && rawPacket[1] == 0x03) { // Interrupt request return std::make_unique(rawPacket); diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.hpp b/src/DebugServer/Gdb/GdbRspDebugServer.hpp index b35c2edc..b6638ab4 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.hpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.hpp @@ -161,7 +161,7 @@ namespace Bloom::DebugServer::Gdb * @param rawPacket * @return */ - virtual std::unique_ptr resolveCommandPacket(const RawPacketType& rawPacket); + virtual std::unique_ptr resolveCommandPacket(const RawPacket& rawPacket); /** * Should return a set of GDB features supported by the GDB server. Each supported feature may come with an diff --git a/src/DebugServer/Gdb/Packet.hpp b/src/DebugServer/Gdb/Packet.hpp index f8b29c45..e06bf722 100644 --- a/src/DebugServer/Gdb/Packet.hpp +++ b/src/DebugServer/Gdb/Packet.hpp @@ -9,7 +9,7 @@ namespace Bloom::DebugServer::Gdb { - using RawPacketType = std::vector; + using RawPacket = std::vector; /** * The Packet class implements the data structure for GDB RSP packets. @@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb class Packet { public: - explicit Packet(const RawPacketType& rawPacket) { + explicit Packet(const RawPacket& rawPacket) { this->init(rawPacket); } @@ -45,7 +45,7 @@ namespace Bloom::DebugServer::Gdb * * @return */ - [[nodiscard]] RawPacketType toRawPacket() const { + [[nodiscard]] RawPacket toRawPacket() const { std::vector packet = {'$'}; auto data = this->getData(); @@ -139,7 +139,7 @@ namespace Bloom::DebugServer::Gdb protected: std::vector data; - void init(const RawPacketType& rawPacket) { + void init(const RawPacket& rawPacket) { this->data.insert( this->data.begin(), rawPacket.begin() + 1, diff --git a/src/DebugServer/Gdb/README.md b/src/DebugServer/Gdb/README.md index 8c5802eb..f662cec7 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 RawPacketType& rawPacket); + explicit SetBreakpoint(const RawPacket& rawPacket); void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override; }; diff --git a/src/DebugServer/Gdb/RegisterDescriptor.hpp b/src/DebugServer/Gdb/RegisterDescriptor.hpp index 3bae4a01..3e235cb5 100644 --- a/src/DebugServer/Gdb/RegisterDescriptor.hpp +++ b/src/DebugServer/Gdb/RegisterDescriptor.hpp @@ -5,7 +5,7 @@ namespace Bloom::DebugServer::Gdb { - using GdbRegisterNumberType = int; + using GdbRegisterNumber = int; /* * GDB defines a set of registers for each target architecture. @@ -14,12 +14,15 @@ namespace Bloom::DebugServer::Gdb */ struct RegisterDescriptor { - GdbRegisterNumberType number; + GdbRegisterNumber number; std::uint16_t size; std::string name; - RegisterDescriptor(GdbRegisterNumberType number, std::uint16_t size, const std::string& name) - : number(number), size(size), name(name) {}; + RegisterDescriptor(GdbRegisterNumber number, std::uint16_t size, const std::string& name) + : number(number) + , size(size) + , name(name) + {}; bool operator == (const RegisterDescriptor& other) const { return this->number == other.number; diff --git a/src/DebugServer/Gdb/TargetDescriptor.hpp b/src/DebugServer/Gdb/TargetDescriptor.hpp index 0676bf6d..0eff043d 100644 --- a/src/DebugServer/Gdb/TargetDescriptor.hpp +++ b/src/DebugServer/Gdb/TargetDescriptor.hpp @@ -59,7 +59,7 @@ namespace Bloom::DebugServer::Gdb * @param registerDescriptor * @return */ - virtual std::optional getRegisterNumberFromTargetRegisterDescriptor( + virtual std::optional getRegisterNumberFromTargetRegisterDescriptor( const Targets::TargetRegisterDescriptor& registerDescriptor ) const = 0; @@ -69,7 +69,7 @@ namespace Bloom::DebugServer::Gdb * @param number * @return */ - virtual const RegisterDescriptor& getRegisterDescriptorFromNumber(GdbRegisterNumberType number) const = 0; + virtual const RegisterDescriptor& getRegisterDescriptorFromNumber(GdbRegisterNumber number) const = 0; /** * Should retrieve the mapped target register descriptor for a given GDB register number. @@ -78,7 +78,7 @@ namespace Bloom::DebugServer::Gdb * @return */ virtual const Targets::TargetRegisterDescriptor& getTargetRegisterDescriptorFromNumber( - GdbRegisterNumberType number + GdbRegisterNumber number ) const = 0; /** @@ -86,7 +86,7 @@ namespace Bloom::DebugServer::Gdb * * @return */ - virtual const std::vector& getRegisterNumbers() const = 0; + virtual const std::vector& getRegisterNumbers() const = 0; private: BiMap memoryOffsetsByType; diff --git a/src/DebugToolDrivers/USB/HID/HidInterface.hpp b/src/DebugToolDrivers/USB/HID/HidInterface.hpp index 07894010..0d656e6e 100644 --- a/src/DebugToolDrivers/USB/HID/HidInterface.hpp +++ b/src/DebugToolDrivers/USB/HID/HidInterface.hpp @@ -68,9 +68,9 @@ namespace Bloom::Usb std::string getHidDevicePath(); private: - using HidDeviceType = std::unique_ptr<::hid_device, decltype(&::hid_close)>; + using HidDevice = std::unique_ptr<::hid_device, decltype(&::hid_close)>; - HidDeviceType hidDevice = HidDeviceType(nullptr, ::hid_close); + HidDevice hidDevice = HidDevice(nullptr, ::hid_close); /** * All HID reports have a fixed report length. This means that every packet we send or receive to/from an HID diff --git a/src/DebugToolDrivers/USB/UsbDevice.cpp b/src/DebugToolDrivers/USB/UsbDevice.cpp index b08d828a..bf21e85a 100644 --- a/src/DebugToolDrivers/USB/UsbDevice.cpp +++ b/src/DebugToolDrivers/USB/UsbDevice.cpp @@ -80,12 +80,12 @@ namespace Bloom::Usb ::libusb_free_config_descriptor(configDescriptor); } - std::vector UsbDevice::findMatchingDevices( + std::vector UsbDevice::findMatchingDevices( std::uint16_t vendorId, std::uint16_t productId ) { ::libusb_device** devices = nullptr; ::libusb_device* device; - std::vector matchedDevices; + std::vector matchedDevices; auto libusbStatusCode = ::libusb_get_device_list(UsbDevice::libusbContext.get(), &devices); if (libusbStatusCode < 0) { @@ -96,7 +96,7 @@ namespace Bloom::Usb ssize_t i = 0; while ((device = devices[i++]) != nullptr) { - auto libusbDevice = LibusbDeviceType(device, ::libusb_unref_device); + auto libusbDevice = LibusbDevice(device, ::libusb_unref_device); struct ::libusb_device_descriptor desc = {}; if ((libusbStatusCode = ::libusb_get_device_descriptor(device, &desc)) < 0) { diff --git a/src/DebugToolDrivers/USB/UsbDevice.hpp b/src/DebugToolDrivers/USB/UsbDevice.hpp index 9ceb71c3..1d48498e 100644 --- a/src/DebugToolDrivers/USB/UsbDevice.hpp +++ b/src/DebugToolDrivers/USB/UsbDevice.hpp @@ -10,9 +10,9 @@ namespace Bloom::Usb { - using LibusbContextType = std::unique_ptr<::libusb_context, decltype(&::libusb_exit)>; - using LibusbDeviceType = std::unique_ptr<::libusb_device, decltype(&::libusb_unref_device)>; - using LibusbDeviceHandleType = std::unique_ptr<::libusb_device_handle, decltype(&::libusb_close)>; + using LibusbContext = std::unique_ptr<::libusb_context, decltype(&::libusb_exit)>; + using LibusbDevice = std::unique_ptr<::libusb_device, decltype(&::libusb_unref_device)>; + using LibusbDeviceHandle = std::unique_ptr<::libusb_device_handle, decltype(&::libusb_close)>; class UsbDevice { @@ -40,12 +40,12 @@ namespace Bloom::Usb virtual ~UsbDevice(); protected: - static inline LibusbContextType libusbContext = LibusbContextType(nullptr, ::libusb_exit); + static inline LibusbContext libusbContext = LibusbContext(nullptr, ::libusb_exit); - LibusbDeviceType libusbDevice = LibusbDeviceType(nullptr, ::libusb_unref_device); - LibusbDeviceHandleType libusbDeviceHandle = LibusbDeviceHandleType(nullptr, ::libusb_close); + LibusbDevice libusbDevice = LibusbDevice(nullptr, ::libusb_unref_device); + LibusbDeviceHandle libusbDeviceHandle = LibusbDeviceHandle(nullptr, ::libusb_close); - std::vector findMatchingDevices(std::uint16_t vendorId, std::uint16_t productId); + std::vector findMatchingDevices(std::uint16_t vendorId, std::uint16_t productId); void detachKernelDriverFromInterface(std::uint8_t interfaceNumber); diff --git a/src/Helpers/Process.cpp b/src/Helpers/Process.cpp index 0499760c..66fc29e2 100644 --- a/src/Helpers/Process.cpp +++ b/src/Helpers/Process.cpp @@ -47,15 +47,15 @@ namespace Bloom return false; } - Process::ProcT Process::getProcessInfo(::pid_t processId) { + Process::Proc Process::getProcessInfo(::pid_t processId) { auto proc = std::unique_ptr<::PROCTAB, decltype(&::closeproc)>( ::openproc(PROC_FILLSTAT | PROC_FILLARG | PROC_PID, &processId), ::closeproc ); - auto processInfo = ProcT(::readproc(proc.get(), NULL), ::freeproc); + auto processInfo = Proc(::readproc(proc.get(), NULL), ::freeproc); if (processInfo == NULL) { - return ProcT(nullptr, ::freeproc); + return Proc(nullptr, ::freeproc); } return processInfo; diff --git a/src/Helpers/Process.hpp b/src/Helpers/Process.hpp index 7e0be180..48a0b13b 100644 --- a/src/Helpers/Process.hpp +++ b/src/Helpers/Process.hpp @@ -35,7 +35,7 @@ namespace Bloom private: - using ProcT = std::unique_ptr<::proc_t, decltype(&::freeproc)>; - static ProcT getProcessInfo(::pid_t processId); + using Proc = std::unique_ptr<::proc_t, decltype(&::freeproc)>; + static Proc getProcessInfo(::pid_t processId); }; } diff --git a/src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.hpp b/src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.hpp index b5917b94..742bf602 100644 --- a/src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.hpp +++ b/src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.hpp @@ -22,7 +22,7 @@ namespace Bloom }; signals: - void targetPinStatesRetrieved(Bloom::Targets::TargetPinStateMappingType pinStatesByNumber); + void targetPinStatesRetrieved(Bloom::Targets::TargetPinStateMapping pinStatesByNumber); protected: void run(TargetController::TargetControllerConsole& targetControllerConsole) override; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp index 1b00b320..eb9cc154 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp @@ -71,7 +71,7 @@ namespace Bloom::Widgets::InsightTargetWidgets InsightWorker::queueTask(refreshTask); } - void TargetPackageWidget::updatePinStates(const Targets::TargetPinStateMappingType& pinStatesByNumber) { + void TargetPackageWidget::updatePinStates(const Targets::TargetPinStateMapping& pinStatesByNumber) { for (auto& pinWidget : this->pinWidgets) { auto pinNumber = pinWidget->getPinNumber(); if (pinStatesByNumber.contains(pinNumber)) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.hpp index b555af0f..343a4d2e 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.hpp @@ -41,7 +41,7 @@ namespace Bloom::Widgets::InsightTargetWidgets Targets::TargetState targetState = Targets::TargetState::UNKNOWN; - virtual void updatePinStates(const Targets::TargetPinStateMappingType& pinStatesByNumber); + virtual void updatePinStates(const Targets::TargetPinStateMapping& pinStatesByNumber); void onTargetStateChanged(Targets::TargetState newState); void onProgrammingModeEnabled(); void onProgrammingModeDisabled(); diff --git a/src/TargetController/Responses/TargetPinStates.hpp b/src/TargetController/Responses/TargetPinStates.hpp index 76301663..80bd7253 100644 --- a/src/TargetController/Responses/TargetPinStates.hpp +++ b/src/TargetController/Responses/TargetPinStates.hpp @@ -11,9 +11,9 @@ namespace Bloom::TargetController::Responses public: static constexpr ResponseType type = ResponseType::TARGET_PIN_STATES; - Targets::TargetPinStateMappingType pinStatesByNumber; + Targets::TargetPinStateMapping pinStatesByNumber; - explicit TargetPinStates(const Targets::TargetPinStateMappingType& pinStatesByNumber) + explicit TargetPinStates(const Targets::TargetPinStateMapping& pinStatesByNumber) : pinStatesByNumber(pinStatesByNumber) {} diff --git a/src/TargetController/TargetControllerConsole.cpp b/src/TargetController/TargetControllerConsole.cpp index 23563028..0ddce64c 100644 --- a/src/TargetController/TargetControllerConsole.cpp +++ b/src/TargetController/TargetControllerConsole.cpp @@ -67,7 +67,7 @@ namespace Bloom::TargetController using Targets::TargetPinDescriptor; using Targets::TargetPinState; - using Targets::TargetPinStateMappingType; + using Targets::TargetPinStateMapping; TargetControllerState TargetControllerConsole::getTargetControllerState() { return this->commandManager.sendCommandAndWaitForResponse( @@ -218,7 +218,7 @@ namespace Bloom::TargetController ); } - TargetPinStateMappingType TargetControllerConsole::getPinStates(int variantId) { + TargetPinStateMapping TargetControllerConsole::getPinStates(int variantId) { return this->commandManager.sendCommandAndWaitForResponse( std::make_unique(variantId), this->defaultTimeout diff --git a/src/TargetController/TargetControllerConsole.hpp b/src/TargetController/TargetControllerConsole.hpp index ebd8767c..dd7f5a83 100644 --- a/src/TargetController/TargetControllerConsole.hpp +++ b/src/TargetController/TargetControllerConsole.hpp @@ -171,7 +171,7 @@ namespace Bloom::TargetController * * @param variantId */ - Targets::TargetPinStateMappingType getPinStates(int variantId); + Targets::TargetPinStateMapping getPinStates(int variantId); /** * Updates the pin state on the target, for a specific pin. diff --git a/src/Targets/TargetPinDescriptor.hpp b/src/Targets/TargetPinDescriptor.hpp index 1b780515..356d3943 100644 --- a/src/Targets/TargetPinDescriptor.hpp +++ b/src/Targets/TargetPinDescriptor.hpp @@ -57,9 +57,9 @@ namespace Bloom::Targets std::optional ioDirection; }; - using TargetPinStateMappingType = std::map; + using TargetPinStateMapping = std::map; } Q_DECLARE_METATYPE(Bloom::Targets::TargetPinDescriptor) Q_DECLARE_METATYPE(Bloom::Targets::TargetPinState) -Q_DECLARE_METATYPE(Bloom::Targets::TargetPinStateMappingType) +Q_DECLARE_METATYPE(Bloom::Targets::TargetPinStateMapping)