Renamed GdbRsp directory to Gdb

This commit is contained in:
Nav
2022-03-31 21:52:46 +01:00
parent 01d52bb130
commit 2aa240a680
57 changed files with 64 additions and 64 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* In the event that communication between the GDB RSP client and Bloom fails, a ClientCommunicationFailure
* exception should be thrown. The GDB debug server handles this by severing the connection.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class ClientCommunicationError: public Bloom::Exceptions::Exception
{
public:
explicit ClientCommunicationError(const std::string& message): Bloom::Exceptions::Exception(message) {
this->message = message;
}
explicit ClientCommunicationError(const char* message): Bloom::Exceptions::Exception(message) {
this->message = std::string(message);
}
explicit ClientCommunicationError() = default;
};
}

View File

@@ -0,0 +1,27 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* When a GDB RSP client unexpectedly drops the connection in the middle of an IO operation, a ClientDisconnected
* exception should be thrown. The GDB debug server handles this by clearing the connection and waiting for a new
* one.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class ClientDisconnected: public Bloom::Exceptions::Exception
{
public:
explicit ClientDisconnected(const std::string& message): Bloom::Exceptions::Exception(message) {
this->message = message;
}
explicit ClientDisconnected(const char* message): Bloom::Exceptions::Exception(message) {
this->message = std::string(message);
}
explicit ClientDisconnected() = default;
};
}

View File

@@ -0,0 +1,26 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* In the event that the GDB debug server determines that the connected client cannot be served,
* the ClientNotSupported exception should be thrown.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class ClientNotSupported: public Bloom::Exceptions::Exception
{
public:
explicit ClientNotSupported(const std::string& message): Bloom::Exceptions::Exception(message) {
this->message = message;
}
explicit ClientNotSupported(const char* message): Bloom::Exceptions::Exception(message) {
this->message = std::string(message);
}
explicit ClientNotSupported() = default;
};
}

View File

@@ -0,0 +1,26 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* The GDB server may abort a debug session with the client, if an internal error occurs. One circumstance where
* this can happen is when the TargetController is not able to service the debug session for whatever reason.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class DebugSessionAborted: public Bloom::Exceptions::Exception
{
public:
explicit DebugSessionAborted(const std::string& message): Bloom::Exceptions::Exception(message) {
this->message = message;
}
explicit DebugSessionAborted(const char* message): Bloom::Exceptions::Exception(message) {
this->message = std::string(message);
}
explicit DebugSessionAborted() = default;
};
}