2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2022-03-31 21:52:46 +01:00
|
|
|
#include "src/DebugServer/Gdb/DebugSession.hpp"
|
2024-07-23 21:14:22 +01:00
|
|
|
#include "src/DebugServer/Gdb/TargetDescriptor.hpp"
|
|
|
|
|
#include "src/Targets/TargetDescriptor.hpp"
|
2022-12-26 21:27:19 +00:00
|
|
|
#include "src/Services/TargetControllerService.hpp"
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace DebugServer::Gdb::CommandPackets
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
2024-07-23 21:14:22 +01:00
|
|
|
class CommandPacket
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2024-07-23 21:14:22 +01:00
|
|
|
explicit CommandPacket(const RawPacket& rawPacket);
|
2023-04-01 14:30:33 +01:00
|
|
|
|
2021-04-04 21:04:12 +01:00
|
|
|
/**
|
2022-03-24 19:17:41 +00:00
|
|
|
* Should handle the command for the current active debug session.
|
|
|
|
|
*
|
|
|
|
|
* @param debugSession
|
|
|
|
|
* The current active debug session.
|
2021-04-04 21:04:12 +01:00
|
|
|
*
|
2022-12-26 21:27:19 +00:00
|
|
|
* @param TargetControllerService
|
2021-04-04 21:04:12 +01:00
|
|
|
*/
|
2022-04-09 15:57:24 +01:00
|
|
|
virtual void handle(
|
|
|
|
|
DebugSession& debugSession,
|
2024-07-23 21:14:22 +01:00
|
|
|
const TargetDescriptor& gdbTargetDescriptor,
|
|
|
|
|
const Targets::TargetDescriptor& targetDescriptor,
|
2022-12-26 21:27:19 +00:00
|
|
|
Services::TargetControllerService& targetControllerService
|
2022-04-09 15:57:24 +01:00
|
|
|
);
|
2024-07-23 21:14:22 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
std::vector<unsigned char> data;
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|