Files
BloomPatched/src/DebugServer/GdbRsp/CommandPackets/SetBreakpoint.hpp

39 lines
1014 B
C++
Raw Normal View History

2021-04-04 21:04:12 +01:00
#pragma once
#include <cstdint>
#include <string>
#include <set>
#include "CommandPacket.hpp"
#include "src/DebugServer/GdbRsp/BreakpointType.hpp"
2021-04-04 21:04:12 +01:00
namespace Bloom::DebugServer::Gdb::CommandPackets
2021-04-04 21:04:12 +01:00
{
/**
* The SetBreakpoint class implements the structure for "Z" command packets. Upon receiving this command, the
* server is expected to set a breakpoint at the specified address.
*/
class SetBreakpoint: public CommandPacket
{
public:
/**
* Breakpoint type (Software or Hardware)
*/
BreakpointType type = BreakpointType::UNKNOWN;
/**
* Address at which the breakpoint should be located.
*/
std::uint32_t address = 0;
2021-04-04 21:04:12 +01:00
explicit SetBreakpoint(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {
2021-04-04 21:04:12 +01:00
this->init();
};
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
private:
void init();
2021-04-04 21:04:12 +01:00
};
}