New GDB Monitor command packet class, for "qRcmd" command packets

This commit is contained in:
Nav
2022-04-08 22:18:52 +01:00
parent 908f1c42c9
commit 583b01fa34
4 changed files with 59 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
#include "CommandPackets/WriteRegister.hpp"
#include "CommandPackets/SetBreakpoint.hpp"
#include "CommandPackets/RemoveBreakpoint.hpp"
#include "CommandPackets/Monitor.hpp"
// Response packets
#include "ResponsePackets/TargetStopped.hpp"
@@ -265,6 +266,12 @@ namespace Bloom::DebugServer::Gdb
if (rawPacketString[1] == 'z') {
return std::make_unique<CommandPackets::RemoveBreakpoint>(rawPacket);
}
if (rawPacketString.find("qRcmd") == 1) {
// This is a monitor packet
auto monitorCommand = std::make_unique<CommandPackets::Monitor>(rawPacket);
return monitorCommand;
}
}
return std::make_unique<CommandPacket>(rawPacket);