Renamed DebugServers namespace to DebugServer

This commit is contained in:
Nav
2022-03-31 16:05:39 +01:00
parent e52ef609a4
commit ac9fad3726
58 changed files with 66 additions and 66 deletions

View File

@@ -390,12 +390,12 @@ namespace Bloom
} }
void Application::startDebugServer() { void Application::startDebugServer() {
this->debugServer = std::make_unique<DebugServers::DebugServerComponent>( this->debugServer = std::make_unique<DebugServer::DebugServerComponent>(
this->debugServerConfig.value() this->debugServerConfig.value()
); );
this->debugServerThread = std::thread( this->debugServerThread = std::thread(
&DebugServers::DebugServerComponent::run, &DebugServer::DebugServerComponent::run,
this->debugServer.get() this->debugServer.get()
); );

View File

@@ -85,7 +85,7 @@ namespace Bloom
* *
* See the DebugServer and GdbRspDebugServer class for more on this. * See the DebugServer and GdbRspDebugServer class for more on this.
*/ */
std::unique_ptr<DebugServers::DebugServerComponent> debugServer = nullptr; std::unique_ptr<DebugServer::DebugServerComponent> debugServer = nullptr;
std::thread debugServerThread; std::thread debugServerThread;
/** /**

View File

@@ -8,7 +8,7 @@
#include "src/Exceptions/InvalidConfig.hpp" #include "src/Exceptions/InvalidConfig.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
namespace Bloom::DebugServers namespace Bloom::DebugServer
{ {
using namespace Bloom::Events; using namespace Bloom::Events;
@@ -38,7 +38,7 @@ namespace Bloom::DebugServers
{ {
"avr-gdb-rsp", "avr-gdb-rsp",
[this] () -> std::unique_ptr<ServerInterface> { [this] () -> std::unique_ptr<ServerInterface> {
return std::make_unique<DebugServers::Gdb::AvrGdb::AvrGdbRsp>( return std::make_unique<DebugServer::Gdb::AvrGdb::AvrGdbRsp>(
this->debugServerConfig, this->debugServerConfig,
*(this->eventListener.get()) *(this->eventListener.get())
); );

View File

@@ -17,7 +17,7 @@
#include "ServerInterface.hpp" #include "ServerInterface.hpp"
namespace Bloom::DebugServers namespace Bloom::DebugServer
{ {
/** /**
* The DebugServer exposes the connected target to third-party debugging software such as IDEs. * The DebugServer exposes the connected target to third-party debugging software such as IDEs.

View File

@@ -4,7 +4,7 @@
#include "CommandPackets/ReadMemory.hpp" #include "CommandPackets/ReadMemory.hpp"
#include "CommandPackets/WriteMemory.hpp" #include "CommandPackets/WriteMemory.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb namespace Bloom::DebugServer::Gdb::AvrGdb
{ {
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;
@@ -19,7 +19,7 @@ namespace Bloom::DebugServers::Gdb::AvrGdb
{} {}
void AvrGdbRsp::init() { void AvrGdbRsp::init() {
DebugServers::Gdb::GdbRspDebugServer::init(); DebugServer::Gdb::GdbRspDebugServer::init();
this->gdbTargetDescriptor = TargetDescriptor( this->gdbTargetDescriptor = TargetDescriptor(
this->targetControllerConsole.getTargetDescriptor() this->targetControllerConsole.getTargetDescriptor()

View File

@@ -6,7 +6,7 @@
#include "src/DebugServers/GdbRsp/GdbRspDebugServer.hpp" #include "src/DebugServers/GdbRsp/GdbRspDebugServer.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb namespace Bloom::DebugServer::Gdb::AvrGdb
{ {
/** /**
* The AVR GDB client (avr-gdb) defines a set of parameters relating to AVR targets. These parameters are * The AVR GDB client (avr-gdb) defines a set of parameters relating to AVR targets. These parameters are

View File

@@ -7,7 +7,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;

View File

@@ -7,13 +7,13 @@
#include "src/Targets/TargetMemory.hpp" #include "src/Targets/TargetMemory.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb::CommandPackets namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{ {
/** /**
* The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is * The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is
* expected to read memory from the target and send it the client. * expected to read memory from the target and send it the client.
*/ */
class AbstractMemoryAccessPacket: public Bloom::DebugServers::Gdb::CommandPackets::CommandPacket class AbstractMemoryAccessPacket: public Bloom::DebugServer::Gdb::CommandPackets::CommandPacket
{ {
public: public:
explicit AbstractMemoryAccessPacket(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {}; explicit AbstractMemoryAccessPacket(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {};

View File

@@ -6,7 +6,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb::CommandPackets namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{ {
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;
using ResponsePackets::ResponsePacket; using ResponsePackets::ResponsePacket;

View File

@@ -5,7 +5,7 @@
#include "AbstractMemoryAccessPacket.hpp" #include "AbstractMemoryAccessPacket.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb::CommandPackets namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{ {
/** /**
* The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is * The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is

View File

@@ -6,7 +6,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb::CommandPackets namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{ {
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;
using ResponsePackets::OkResponsePacket; using ResponsePackets::OkResponsePacket;

View File

@@ -5,7 +5,7 @@
#include "AbstractMemoryAccessPacket.hpp" #include "AbstractMemoryAccessPacket.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb::CommandPackets namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{ {
/** /**
* The WriteMemory class implements the structure for "M" packets. Upon receiving this packet, the server is * The WriteMemory class implements the structure for "M" packets. Upon receiving this packet, the server is

View File

@@ -5,7 +5,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb namespace Bloom::DebugServer::Gdb::AvrGdb
{ {
using Bloom::Targets::TargetRegisterDescriptor; using Bloom::Targets::TargetRegisterDescriptor;
using Bloom::Targets::TargetRegisterType; using Bloom::Targets::TargetRegisterType;
@@ -13,7 +13,7 @@ namespace Bloom::DebugServers::Gdb::AvrGdb
using Bloom::Exceptions::Exception; using Bloom::Exceptions::Exception;
TargetDescriptor::TargetDescriptor(const Bloom::Targets::TargetDescriptor& targetDescriptor) TargetDescriptor::TargetDescriptor(const Bloom::Targets::TargetDescriptor& targetDescriptor)
: DebugServers::Gdb::TargetDescriptor(targetDescriptor) : DebugServer::Gdb::TargetDescriptor(targetDescriptor)
{ {
this->loadRegisterMappings(); this->loadRegisterMappings();
} }

View File

@@ -4,9 +4,9 @@
#include "src/Helpers/BiMap.hpp" #include "src/Helpers/BiMap.hpp"
namespace Bloom::DebugServers::Gdb::AvrGdb namespace Bloom::DebugServer::Gdb::AvrGdb
{ {
class TargetDescriptor: public DebugServers::Gdb::TargetDescriptor class TargetDescriptor: public DebugServer::Gdb::TargetDescriptor
{ {
public: public:
BiMap<GdbRegisterNumberType, RegisterDescriptor> registerDescriptorsByGdbNumber = {}; BiMap<GdbRegisterNumberType, RegisterDescriptor> registerDescriptorsByGdbNumber = {};

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
enum class BreakpointType: int enum class BreakpointType: int
{ {

View File

@@ -10,7 +10,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::ResponsePacket; using ResponsePackets::ResponsePacket;
using ResponsePackets::OkResponsePacket; using ResponsePackets::OkResponsePacket;

View File

@@ -8,7 +8,7 @@
#include "src/TargetController/TargetControllerConsole.hpp" #include "src/TargetController/TargetControllerConsole.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* GDB RSP command packets are sent to the server, from the GDB client. These packets carry instructions that the * GDB RSP command packets are sent to the server, from the GDB client. These packets carry instructions that the

View File

@@ -5,7 +5,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;
using Exceptions::Exception; using Exceptions::Exception;

View File

@@ -5,7 +5,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The ContinueExecution class implements a structure for "c" packets. These packets instruct the server * The ContinueExecution class implements a structure for "c" packets. These packets instruct the server

View File

@@ -7,7 +7,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::TargetStopped; using ResponsePackets::TargetStopped;
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;

View File

@@ -2,7 +2,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The InterruptException class represents interrupt command packets. Upon receiving an interrupt packet, the * The InterruptException class represents interrupt command packets. Upon receiving an interrupt packet, the

View File

@@ -8,7 +8,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using Targets::TargetRegister; using Targets::TargetRegister;
using Targets::TargetRegisterDescriptors; using Targets::TargetRegisterDescriptors;

View File

@@ -6,7 +6,7 @@
#include "src/DebugServers/GdbRsp/RegisterDescriptor.hpp" #include "src/DebugServers/GdbRsp/RegisterDescriptor.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The ReadRegisters class implements a structure for "g" and "p" command packets. In response to these * The ReadRegisters class implements a structure for "g" and "p" command packets. In response to these

View File

@@ -10,7 +10,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using Targets::TargetBreakpoint; using Targets::TargetBreakpoint;

View File

@@ -7,7 +7,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
#include "src/DebugServers/GdbRsp/BreakpointType.hpp" #include "src/DebugServers/GdbRsp/BreakpointType.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The RemoveBreakpoint class implements the structure for "z" command packets. Upon receiving this command, the * The RemoveBreakpoint class implements the structure for "z" command packets. Upon receiving this command, the

View File

@@ -10,7 +10,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using Targets::TargetBreakpoint; using Targets::TargetBreakpoint;

View File

@@ -7,7 +7,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
#include "src/DebugServers/GdbRsp/BreakpointType.hpp" #include "src/DebugServers/GdbRsp/BreakpointType.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The SetBreakpoint class implements the structure for "Z" command packets. Upon receiving this command, the * The SetBreakpoint class implements the structure for "Z" command packets. Upon receiving this command, the

View File

@@ -5,7 +5,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;

View File

@@ -5,7 +5,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The StepExecution class implements the structure for "s" command packets. Upon receiving this command, the * The StepExecution class implements the structure for "s" command packets. Upon receiving this command, the

View File

@@ -11,7 +11,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
#include "src/DebugServers/GdbRsp/Exceptions/ClientNotSupported.hpp" #include "src/DebugServers/GdbRsp/Exceptions/ClientNotSupported.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using ResponsePackets::SupportedFeaturesResponse; using ResponsePackets::SupportedFeaturesResponse;
using ResponsePackets::ErrorResponsePacket; using ResponsePackets::ErrorResponsePacket;

View File

@@ -6,7 +6,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
#include "../Feature.hpp" #include "../Feature.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The SupportedFeaturesQuery command packet is a query from the GDB client, requesting a list of GDB features * The SupportedFeaturesQuery command packet is a query from the GDB client, requesting a list of GDB features

View File

@@ -9,7 +9,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
using Targets::TargetRegister; using Targets::TargetRegister;
using Targets::TargetRegisterDescriptors; using Targets::TargetRegisterDescriptors;

View File

@@ -5,7 +5,7 @@
#include "CommandPacket.hpp" #include "CommandPacket.hpp"
#include "src/Targets/TargetRegister.hpp" #include "src/Targets/TargetRegister.hpp"
namespace Bloom::DebugServers::Gdb::CommandPackets namespace Bloom::DebugServer::Gdb::CommandPackets
{ {
/** /**
* The WriteRegisters class implements the structure for "P" packets. Upon receiving this packet, * The WriteRegisters class implements the structure for "P" packets. Upon receiving this packet,

View File

@@ -12,7 +12,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
using namespace Exceptions; using namespace Exceptions;
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;

View File

@@ -15,7 +15,7 @@
#include "src/DebugServers/GdbRsp/Packet.hpp" #include "src/DebugServers/GdbRsp/Packet.hpp"
#include "src/DebugServers/GdbRsp/ResponsePackets/ResponsePacket.hpp" #include "src/DebugServers/GdbRsp/ResponsePackets/ResponsePacket.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
/** /**
* The Connection class represents an active connection between the GDB RSP server and client. * The Connection class represents an active connection between the GDB RSP server and client.

View File

@@ -2,7 +2,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
DebugSession::DebugSession(Connection&& connection, const TargetDescriptor& targetDescriptor) DebugSession::DebugSession(Connection&& connection, const TargetDescriptor& targetDescriptor)
: connection(std::move(connection)) : connection(std::move(connection))

View File

@@ -5,7 +5,7 @@
#include "TargetDescriptor.hpp" #include "TargetDescriptor.hpp"
#include "Connection.hpp" #include "Connection.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
class DebugSession class DebugSession
{ {

View File

@@ -2,7 +2,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::Exceptions namespace Bloom::DebugServer::Gdb::Exceptions
{ {
/** /**
* In the event that communication between the GDB RSP client and Bloom fails, a ClientCommunicationFailure * In the event that communication between the GDB RSP client and Bloom fails, a ClientCommunicationFailure

View File

@@ -2,7 +2,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::Exceptions namespace Bloom::DebugServer::Gdb::Exceptions
{ {
/** /**
* When a GDB RSP client unexpectedly drops the connection in the middle of an IO operation, a ClientDisconnected * When a GDB RSP client unexpectedly drops the connection in the middle of an IO operation, a ClientDisconnected

View File

@@ -2,7 +2,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::Exceptions namespace Bloom::DebugServer::Gdb::Exceptions
{ {
/** /**
* In the event that the GDB debug server determines that the connected client cannot be served, * In the event that the GDB debug server determines that the connected client cannot be served,

View File

@@ -2,7 +2,7 @@
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServers::Gdb::Exceptions namespace Bloom::DebugServer::Gdb::Exceptions
{ {
/** /**
* The GDB server may abort a debug session with the client, if an internal error occurs. One circumstance where * The GDB server may abort a debug session with the client, if an internal error occurs. One circumstance where

View File

@@ -2,7 +2,7 @@
#include "src/Helpers/BiMap.hpp" #include "src/Helpers/BiMap.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
enum class Feature: int enum class Feature: int
{ {

View File

@@ -1,6 +1,6 @@
#include "GdbDebugServerConfig.hpp" #include "GdbDebugServerConfig.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
GdbDebugServerConfig::GdbDebugServerConfig(const DebugServerConfig& debugServerConfig) GdbDebugServerConfig::GdbDebugServerConfig(const DebugServerConfig& debugServerConfig)
: DebugServerConfig(debugServerConfig) : DebugServerConfig(debugServerConfig)

View File

@@ -2,7 +2,7 @@
#include "src/ProjectConfig.hpp" #include "src/ProjectConfig.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
/** /**
* Extending the generic DebugServerConfig struct to accommodate GDB debug server configuration parameters. * Extending the generic DebugServerConfig struct to accommodate GDB debug server configuration parameters.

View File

@@ -28,7 +28,7 @@
// Response packets // Response packets
#include "ResponsePackets/TargetStopped.hpp" #include "ResponsePackets/TargetStopped.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
using namespace Exceptions; using namespace Exceptions;
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;

View File

@@ -27,7 +27,7 @@
#include "src/Helpers/BiMap.hpp" #include "src/Helpers/BiMap.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
/** /**
* The GdbRspDebugServer is an implementation of a GDB server using the GDB Remote Serial Protocol. * The GdbRspDebugServer is an implementation of a GDB server using the GDB Remote Serial Protocol.

View File

@@ -7,7 +7,7 @@
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
using RawPacketType = std::vector<unsigned char>; using RawPacketType = std::vector<unsigned char>;

View File

@@ -3,7 +3,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
using GdbRegisterNumberType = int; using GdbRegisterNumberType = int;
@@ -56,10 +56,10 @@ namespace std
* class). * class).
*/ */
template<> template<>
class hash<Bloom::DebugServers::Gdb::RegisterDescriptor> class hash<Bloom::DebugServer::Gdb::RegisterDescriptor>
{ {
public: public:
std::size_t operator () (const Bloom::DebugServers::Gdb::RegisterDescriptor& descriptor) const { std::size_t operator () (const Bloom::DebugServer::Gdb::RegisterDescriptor& descriptor) const {
// We use the GDB register number as the hash, as it is unique to the register. // We use the GDB register number as the hash, as it is unique to the register.
return static_cast<size_t>(descriptor.number); return static_cast<size_t>(descriptor.number);
} }

View File

@@ -2,7 +2,7 @@
#include "ResponsePacket.hpp" #include "ResponsePacket.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
/** /**
* Error response packet expected by the GDB client, to indicate an error, in response to certain commands. * Error response packet expected by the GDB client, to indicate an error, in response to certain commands.

View File

@@ -2,7 +2,7 @@
#include "ResponsePacket.hpp" #include "ResponsePacket.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
/** /**
* OK response packet expected by the GDB client, in response to certain commands. * OK response packet expected by the GDB client, in response to certain commands.

View File

@@ -5,7 +5,7 @@
#include "src/DebugServers/GdbRsp/Packet.hpp" #include "src/DebugServers/GdbRsp/Packet.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
/** /**
* Upon receiving a CommandPacket from the connected GDB RSP client, the server is expected to respond with a * Upon receiving a CommandPacket from the connected GDB RSP client, the server is expected to respond with a

View File

@@ -1,6 +1,6 @@
#include "SupportedFeaturesResponse.hpp" #include "SupportedFeaturesResponse.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
std::vector<unsigned char> SupportedFeaturesResponse::getData() const { std::vector<unsigned char> SupportedFeaturesResponse::getData() const {
std::string output = "qSupported:"; std::string output = "qSupported:";

View File

@@ -6,7 +6,7 @@
#include "ResponsePacket.hpp" #include "ResponsePacket.hpp"
#include "../Feature.hpp" #include "../Feature.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
/** /**
* The SupportedFeaturesResponse class implements the response packet structure for the "qSupported" command. * The SupportedFeaturesResponse class implements the response packet structure for the "qSupported" command.

View File

@@ -5,7 +5,7 @@
#include "../StopReason.hpp" #include "../StopReason.hpp"
#include "src/Targets/TargetRegister.hpp" #include "src/Targets/TargetRegister.hpp"
namespace Bloom::DebugServers::Gdb::ResponsePackets namespace Bloom::DebugServer::Gdb::ResponsePackets
{ {
/** /**
* The TargetStopped class implements the response packet structure for any commands that expect a "StopReply" * The TargetStopped class implements the response packet structure for any commands that expect a "StopReply"

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
enum class Signal: unsigned char enum class Signal: unsigned char
{ {

View File

@@ -2,7 +2,7 @@
#include "src/Helpers/BiMap.hpp" #include "src/Helpers/BiMap.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
enum class StopReason: int enum class StopReason: int
{ {

View File

@@ -9,7 +9,7 @@
#include "RegisterDescriptor.hpp" #include "RegisterDescriptor.hpp"
namespace Bloom::DebugServers::Gdb namespace Bloom::DebugServer::Gdb
{ {
struct TargetDescriptor struct TargetDescriptor
{ {

View File

@@ -2,7 +2,7 @@
#include <string> #include <string>
namespace Bloom::DebugServers namespace Bloom::DebugServer
{ {
class ServerInterface class ServerInterface
{ {