Tidying
This commit is contained in:
@@ -36,7 +36,7 @@ src/TargetController/ for more.
|
|||||||
##### DebugServer
|
##### DebugServer
|
||||||
The DebugServer exposes an interface to the connected target, for third-party programs such as GDB and IDEs (GDB
|
The DebugServer exposes an interface to the connected target, for third-party programs such as GDB and IDEs (GDB
|
||||||
front-ends). Currently, Bloom only supports one server - the AVR GDB RSP server. With this server, any AVR compatible
|
front-ends). Currently, Bloom only supports one server - the AVR GDB RSP server. With this server, any AVR compatible
|
||||||
GDB binary (or any IDE with GDB RSP support) can interface with Bloom and thus the connected AVR target. The
|
version of GDB (or any IDE with GDB RSP support) can interface with Bloom and thus the connected AVR target. The
|
||||||
DebugServer runs on a dedicated thread. See the
|
DebugServer runs on a dedicated thread. See the
|
||||||
[DebugServer documentation](./src/DebugServer/README.md) and source code in src/DebugServer/ for more.
|
[DebugServer documentation](./src/DebugServer/README.md) and source code in src/DebugServer/ for more.
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ namespace Bloom::DebugServer::Gdb
|
|||||||
throw ClientCommunicationError("GDB client attempted to send too much data");
|
throw ClientCommunicationError("GDB client attempted to send too much data");
|
||||||
}
|
}
|
||||||
|
|
||||||
bytesToRead = (!bytes.has_value() || (*bytes - output.size()) > bufferSize)
|
bytesToRead = !bytes.has_value() || (*bytes - output.size()) > bufferSize
|
||||||
? bufferSize
|
? bufferSize
|
||||||
: (*bytes - output.size());
|
: (*bytes - output.size());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,15 +15,11 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
|||||||
public:
|
public:
|
||||||
explicit DebugSessionInitialisationFailure(const std::string& message)
|
explicit DebugSessionInitialisationFailure(const std::string& message)
|
||||||
: Bloom::Exceptions::Exception(message)
|
: Bloom::Exceptions::Exception(message)
|
||||||
{
|
{}
|
||||||
this->message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit DebugSessionInitialisationFailure(const char* message)
|
explicit DebugSessionInitialisationFailure(const char* message)
|
||||||
: Bloom::Exceptions::Exception(message)
|
: Bloom::Exceptions::Exception(message)
|
||||||
{
|
{}
|
||||||
this->message = std::string(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit DebugSessionInitialisationFailure() = default;
|
explicit DebugSessionInitialisationFailure() = default;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ namespace Bloom::Exceptions
|
|||||||
class Exception: public std::runtime_error
|
class Exception: public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Exception(): std::runtime_error("") {}
|
explicit Exception()
|
||||||
|
: std::runtime_error("")
|
||||||
|
{}
|
||||||
|
|
||||||
virtual ~Exception() = default;
|
virtual ~Exception() = default;
|
||||||
|
|
||||||
Exception(const Exception& other) noexcept = default;
|
Exception(const Exception& other) noexcept = default;
|
||||||
@@ -16,9 +19,15 @@ namespace Bloom::Exceptions
|
|||||||
Exception& operator = (const Exception& other) = default;
|
Exception& operator = (const Exception& other) = default;
|
||||||
Exception& operator = (Exception&& other) = default;
|
Exception& operator = (Exception&& other) = default;
|
||||||
|
|
||||||
explicit Exception(const std::string& message): std::runtime_error(message.c_str()), message(message) {}
|
explicit Exception(const std::string& message)
|
||||||
|
: std::runtime_error(message.c_str())
|
||||||
|
, message(message)
|
||||||
|
{}
|
||||||
|
|
||||||
explicit Exception(const char* message): std::runtime_error(message), message(std::string(message)) {}
|
explicit Exception(const char* message)
|
||||||
|
: std::runtime_error(message)
|
||||||
|
, message(std::string(message))
|
||||||
|
{}
|
||||||
|
|
||||||
const char* what() const noexcept override {
|
const char* what() const noexcept override {
|
||||||
return this->message.c_str();
|
return this->message.c_str();
|
||||||
|
|||||||
Reference in New Issue
Block a user