2022-05-14 22:43:08 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
2024-10-25 22:22:25 +01:00
|
|
|
#include "CommandPacket.hpp"
|
2022-05-14 22:43:08 +01:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
2022-05-14 22:43:08 +01:00
|
|
|
{
|
|
|
|
|
/**
|
2022-05-15 12:05:46 +01:00
|
|
|
* The ReadMemoryMap class implements a structure for the "qXfer:memory-map:read::..." packet. Upon receiving this
|
2022-05-14 22:43:08 +01:00
|
|
|
* packet, the server is expected to respond with the target's memory map.
|
|
|
|
|
*/
|
2024-10-25 22:22:25 +01:00
|
|
|
class ReadMemoryMap: public CommandPackets::CommandPacket
|
2022-05-14 22:43:08 +01:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* The offset of the memory map, from which to read.
|
|
|
|
|
*/
|
|
|
|
|
std::uint32_t offset = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The length of the memory map to read.
|
|
|
|
|
*/
|
|
|
|
|
std::uint32_t length = 0;
|
|
|
|
|
|
2024-10-25 22:22:25 +01:00
|
|
|
explicit ReadMemoryMap(const RawPacket& rawPacket);
|
2022-05-14 22:43:08 +01:00
|
|
|
|
|
|
|
|
void handle(
|
2024-10-25 22:22:25 +01:00
|
|
|
DebugSession& debugSession,
|
|
|
|
|
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
2024-07-23 21:14:22 +01:00
|
|
|
const Targets::TargetDescriptor& targetDescriptor,
|
2022-12-26 21:27:19 +00:00
|
|
|
Services::TargetControllerService& targetControllerService
|
2022-05-14 22:43:08 +01:00
|
|
|
) override;
|
|
|
|
|
};
|
|
|
|
|
}
|