2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
|
|
#include "../BreakpointType.hpp"
|
|
|
|
|
#include "CommandPacket.hpp"
|
|
|
|
|
|
2021-05-24 20:58:49 +01:00
|
|
|
namespace Bloom::DebugServers::Gdb
|
|
|
|
|
{
|
2021-04-04 21:04:12 +01:00
|
|
|
enum class Feature: int;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Bloom::DebugServers::Gdb::CommandPackets
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The RemoveBreakpoint class implements the structure for "z" command packets. Upon receiving this command, the
|
|
|
|
|
* server is expected to remove a breakpoint at the specified address.
|
|
|
|
|
*/
|
|
|
|
|
class RemoveBreakpoint: public CommandPacket
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* Breakpoint type (Software or Hardware)
|
|
|
|
|
*/
|
|
|
|
|
BreakpointType type = BreakpointType::UNKNOWN;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Address at which the breakpoint should be located.
|
|
|
|
|
*/
|
2021-06-22 23:52:31 +01:00
|
|
|
std::uint32_t address = 0;
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2021-06-22 23:52:31 +01:00
|
|
|
explicit RemoveBreakpoint(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {
|
2021-04-04 21:04:12 +01:00
|
|
|
this->init();
|
|
|
|
|
};
|
|
|
|
|
|
2021-06-22 23:52:31 +01:00
|
|
|
void dispatchToHandler(Gdb::GdbRspDebugServer& gdbRspDebugServer) override;
|
2021-10-06 21:12:31 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void init();
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|