Used RawPacketType alias
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
class CommandPacket: public Packet
|
||||
{
|
||||
public:
|
||||
explicit CommandPacket(const std::vector<unsigned char>& rawPacket): Packet(rawPacket) {}
|
||||
explicit CommandPacket(const RawPacketType& rawPacket): Packet(rawPacket) {}
|
||||
|
||||
/**
|
||||
* Should handle the command for the current active debug session.
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Exceptions::Exception;
|
||||
|
||||
ContinueExecution::ContinueExecution(const std::vector<unsigned char>& rawPacket)
|
||||
ContinueExecution::ContinueExecution(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() > 1) {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::optional<std::uint32_t> fromProgramCounter;
|
||||
|
||||
explicit ContinueExecution(const std::vector<unsigned char>& rawPacket);
|
||||
explicit ContinueExecution(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
class InterruptExecution: public CommandPacket
|
||||
{
|
||||
public:
|
||||
explicit InterruptExecution(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {}
|
||||
explicit InterruptExecution(const RawPacketType& rawPacket): CommandPacket(rawPacket) {}
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using ResponsePackets::EmptyResponsePacket;
|
||||
|
||||
Monitor::Monitor(const std::vector<unsigned char>& rawPacket)
|
||||
Monitor::Monitor(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() > 6) {
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::string command;
|
||||
|
||||
explicit Monitor(const std::vector<unsigned char>& rawPacket);
|
||||
explicit Monitor(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
ReadRegisters::ReadRegisters(const std::vector<unsigned char>& rawPacket)
|
||||
ReadRegisters::ReadRegisters(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() >= 2 && this->data.front() == 'p') {
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::optional<GdbRegisterNumberType> registerNumber;
|
||||
|
||||
explicit ReadRegisters(const std::vector<unsigned char>& rawPacket);
|
||||
explicit ReadRegisters(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
RemoveBreakpoint::RemoveBreakpoint(const std::vector<unsigned char>& rawPacket)
|
||||
RemoveBreakpoint::RemoveBreakpoint(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() < 6) {
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::uint32_t address = 0;
|
||||
|
||||
explicit RemoveBreakpoint(const std::vector<unsigned char>& rawPacket);
|
||||
explicit RemoveBreakpoint(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
SetBreakpoint::SetBreakpoint(const std::vector<unsigned char>& rawPacket)
|
||||
SetBreakpoint::SetBreakpoint(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() < 6) {
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::uint32_t address = 0;
|
||||
|
||||
explicit SetBreakpoint(const std::vector<unsigned char>& rawPacket);
|
||||
explicit SetBreakpoint(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
StepExecution::StepExecution(const std::vector<unsigned char>& rawPacket)
|
||||
StepExecution::StepExecution(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
if (this->data.size() > 1) {
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
std::optional<std::size_t> fromProgramCounter;
|
||||
|
||||
explicit StepExecution(const std::vector<unsigned char>& rawPacket);
|
||||
explicit StepExecution(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
using Bloom::Exceptions::Exception;
|
||||
using Gdb::Exceptions::ClientNotSupported;
|
||||
|
||||
SupportedFeaturesQuery::SupportedFeaturesQuery(const std::vector<unsigned char>& rawPacket)
|
||||
SupportedFeaturesQuery::SupportedFeaturesQuery(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
class SupportedFeaturesQuery: public CommandPacket
|
||||
{
|
||||
public:
|
||||
explicit SupportedFeaturesQuery(const std::vector<unsigned char>& rawPacket);
|
||||
explicit SupportedFeaturesQuery(const RawPacketType& rawPacket);
|
||||
|
||||
[[nodiscard]] bool isFeatureSupported(const Feature& feature) const {
|
||||
return this->supportedFeatures.find(feature) != this->supportedFeatures.end();
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
WriteRegister::WriteRegister(const std::vector<unsigned char>& rawPacket)
|
||||
WriteRegister::WriteRegister(const RawPacketType& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{
|
||||
// The P packet updates a single register
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
int registerNumber = 0;
|
||||
std::vector<unsigned char> registerValue;
|
||||
|
||||
explicit WriteRegister(const std::vector<unsigned char>& rawPacket);
|
||||
explicit WriteRegister(const RawPacketType& rawPacket);
|
||||
|
||||
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user