Renamed GdbRsp directory to Gdb
This commit is contained in:
26
src/DebugServer/Gdb/Exceptions/ClientCommunicationError.hpp
Normal file
26
src/DebugServer/Gdb/Exceptions/ClientCommunicationError.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
27
src/DebugServer/Gdb/Exceptions/ClientDisconnected.hpp
Normal file
27
src/DebugServer/Gdb/Exceptions/ClientDisconnected.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
26
src/DebugServer/Gdb/Exceptions/ClientNotSupported.hpp
Normal file
26
src/DebugServer/Gdb/Exceptions/ClientNotSupported.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
26
src/DebugServer/Gdb/Exceptions/DebugSessionAborted.hpp
Normal file
26
src/DebugServer/Gdb/Exceptions/DebugSessionAborted.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user