2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
|
|
#include "CommandPacket.hpp"
|
2022-03-31 21:52:46 +01:00
|
|
|
#include "src/DebugServer/Gdb/BreakpointType.hpp"
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2022-09-06 17:16:49 +01:00
|
|
|
#include "src/Targets/TargetMemory.hpp"
|
|
|
|
|
|
2022-03-31 16:05:39 +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.
|
|
|
|
|
*/
|
2022-09-06 17:16:49 +01:00
|
|
|
Targets::TargetMemoryAddress address = 0;
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2022-04-08 23:39:51 +01:00
|
|
|
explicit SetBreakpoint(const RawPacketType& rawPacket);
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2022-04-09 15:57:24 +01:00
|
|
|
void handle(
|
|
|
|
|
DebugSession& debugSession,
|
|
|
|
|
TargetController::TargetControllerConsole& targetControllerConsole
|
|
|
|
|
) override;
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|