This commit is contained in:
Nav
2021-04-06 02:10:14 +01:00
parent 2fd045e056
commit 7a28f93ee9
85 changed files with 319 additions and 1177 deletions

View File

@@ -169,7 +169,7 @@ namespace Bloom::DebugServers
void removeBreakpointOnTarget(TargetBreakpoint breakpoint);
public:
DebugServer(EventManager& eventManager) : eventManager(eventManager) {};
DebugServer(EventManager& eventManager): eventManager(eventManager) {};
void setApplicationConfig(const ApplicationConfig& applicationConfig) {
this->applicationConfig = applicationConfig;

View File

@@ -112,7 +112,7 @@ namespace Bloom::DebugServers::Gdb
};
public:
AvrGdbRsp(EventManager& eventManager) : GdbRspDebugServer(eventManager) {};
AvrGdbRsp(EventManager& eventManager): GdbRspDebugServer(eventManager) {};
std::string getName() const override {
return "AVR GDB Remote Serial Protocol Debug Server";

View File

@@ -37,7 +37,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
class CommandPacket: public Packet
{
public:
CommandPacket(const std::vector<unsigned char>& rawPacket) : Packet(rawPacket) {}
CommandPacket(const std::vector<unsigned char>& rawPacket): Packet(rawPacket) {}
/**
* Double dispatches the packet to the appropriate overload of handleGdbPacket(), within the passed instance of

View File

@@ -29,7 +29,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::optional<std::uint32_t> fromProgramCounter;
ContinueExecution(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
ContinueExecution(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -17,7 +17,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
class InterruptExecution: public CommandPacket
{
public:
InterruptExecution(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {};
InterruptExecution(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {};
virtual void dispatchToHandler(Gdb::GdbRspDebugServer& gdbRspDebugServer) override;
};

View File

@@ -28,7 +28,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::optional<int> registerNumber;
ReadGeneralRegisters(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
ReadGeneralRegisters(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -33,7 +33,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::uint32_t bytes;
ReadMemory(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
ReadMemory(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -35,7 +35,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::uint32_t address;
RemoveBreakpoint(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
RemoveBreakpoint(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
this->init();
};

View File

@@ -35,7 +35,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::uint32_t address;
SetBreakpoint(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
SetBreakpoint(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
this->init();
};

View File

@@ -23,7 +23,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
*/
std::optional<size_t> fromProgramCounter;
StepExecution(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
StepExecution(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -29,7 +29,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
void init();
public:
SupportedFeaturesQuery(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
SupportedFeaturesQuery(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
this->init();
};

View File

@@ -25,7 +25,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
int registerNumber;
std::vector<unsigned char> registerValue;
WriteGeneralRegisters(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
WriteGeneralRegisters(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -29,7 +29,7 @@ namespace Bloom::DebugServers::Gdb::CommandPackets
TargetMemoryBuffer buffer;
WriteMemory(std::vector<unsigned char> rawPacket) : CommandPacket(rawPacket) {
WriteMemory(std::vector<unsigned char> rawPacket): CommandPacket(rawPacket) {
init();
};

View File

@@ -15,11 +15,11 @@ namespace Bloom::DebugServers::Gdb::Exceptions
class ClientCommunicationError: public Exception
{
public:
explicit ClientCommunicationError(const std::string& message) : Exception(message) {
explicit ClientCommunicationError(const std::string& message): Exception(message) {
this->message = message;
}
explicit ClientCommunicationError(const char* message) : Exception(message) {
explicit ClientCommunicationError(const char* message): Exception(message) {
this->message = std::string(message);
}

View File

@@ -16,11 +16,11 @@ namespace Bloom::DebugServers::Gdb::Exceptions
class ClientDisconnected: public Exception
{
public:
explicit ClientDisconnected(const std::string& message) : Exception(message) {
explicit ClientDisconnected(const std::string& message): Exception(message) {
this->message = message;
}
explicit ClientDisconnected(const char* message) : Exception(message) {
explicit ClientDisconnected(const char* message): Exception(message) {
this->message = std::string(message);
}

View File

@@ -15,11 +15,11 @@ namespace Bloom::DebugServers::Gdb::Exceptions
class ClientNotSupported: public Exception
{
public:
explicit ClientNotSupported(const std::string& message) : Exception(message) {
explicit ClientNotSupported(const std::string& message): Exception(message) {
this->message = message;
}
explicit ClientNotSupported(const char* message) : Exception(message) {
explicit ClientNotSupported(const char* message): Exception(message) {
this->message = std::string(message);
}

View File

@@ -163,7 +163,7 @@ namespace Bloom::DebugServers::Gdb
}
public:
GdbRspDebugServer(EventManager& eventManager) : DebugServer(eventManager) {};
GdbRspDebugServer(EventManager& eventManager): DebugServer(eventManager) {};
std::string getName() const override {
return "GDB Remote Serial Protocol DebugServer";

View File

@@ -20,7 +20,7 @@ namespace Bloom::DebugServers::Gdb::ResponsePackets
std::optional<TargetRegisterMap> registerMap;
std::optional<StopReason> stopReason;
TargetStopped(Signal signal) : signal(signal) {}
TargetStopped(Signal signal): signal(signal) {}
std::vector<unsigned char> getData() const override {
std::string output = "T" + this->dataToHex({static_cast<unsigned char>(this->signal)});