From 4c47bda7b30002da80f79b3b440d978c397d3017 Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 26 Aug 2024 12:37:41 +0100 Subject: [PATCH] New `PartialResponsePacket` class for delivering partial responses to GDB --- .../ResponsePackets/PartialResponsePacket.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/DebugServer/Gdb/ResponsePackets/PartialResponsePacket.hpp diff --git a/src/DebugServer/Gdb/ResponsePackets/PartialResponsePacket.hpp b/src/DebugServer/Gdb/ResponsePackets/PartialResponsePacket.hpp new file mode 100644 index 00000000..c4a200fe --- /dev/null +++ b/src/DebugServer/Gdb/ResponsePackets/PartialResponsePacket.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include + +#include "ResponsePacket.hpp" + +namespace DebugServer::Gdb::ResponsePackets +{ + class PartialResponsePacket: public ResponsePacket + { + public: + PartialResponsePacket(const std::string& output) + : ResponsePacket(std::vector{'O'}) + { + this->data.insert(this->data.end(), output.begin(), output.end()); + } + }; +}