Files
BloomPatched/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp
Nav 7d4ce1050f - Implemented support for range stepping with GDB (vCont... packets)
- Refactored some bits of the generic GDB server class, along with the AVR-specific implementation
2023-09-11 03:32:58 +01:00

43 lines
1.2 KiB
C++

#pragma once
#include <cstdint>
#include <optional>
#include "src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp"
#include "src/DebugServer/Gdb/TargetDescriptor.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace DebugServer::Gdb::AvrGdb::CommandPackets
{
/**
* The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is
* expected to read memory from the target and send it the client.
*/
class ReadMemory: public Gdb::CommandPackets::CommandPacket
{
public:
/**
* Start address of the memory operation.
*/
Targets::TargetMemoryAddress startAddress = 0;
/**
* The type of memory to read from.
*/
Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::FLASH;
/**
* Number of bytes to read.
*/
Targets::TargetMemorySize bytes = 0;
explicit ReadMemory(const RawPacket& rawPacket, const Gdb::TargetDescriptor& gdbTargetDescriptor);
void handle(
Gdb::DebugSession& debugSession,
Services::TargetControllerService& targetControllerService
) override;
};
}