New GDB "monitor reset" command packet class

This commit is contained in:
Nav
2022-04-08 22:23:30 +01:00
parent 583b01fa34
commit f7feef9ea1
5 changed files with 82 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include "CommandPackets/SetBreakpoint.hpp"
#include "CommandPackets/RemoveBreakpoint.hpp"
#include "CommandPackets/Monitor.hpp"
#include "CommandPackets/ResetTarget.hpp"
// Response packets
#include "ResponsePackets/TargetStopped.hpp"
@@ -270,6 +271,11 @@ namespace Bloom::DebugServer::Gdb
if (rawPacketString.find("qRcmd") == 1) {
// This is a monitor packet
auto monitorCommand = std::make_unique<CommandPackets::Monitor>(rawPacket);
if (monitorCommand->command == "reset") {
return std::make_unique<CommandPackets::ResetTarget>(std::move(*(monitorCommand.get())));
}
return monitorCommand;
}
}