Tidied AVR GDB memory access command packet classes

This commit is contained in:
Nav
2022-04-03 20:35:53 +01:00
parent 80d7c9588f
commit 17c301b57a
7 changed files with 55 additions and 45 deletions

View File

@@ -3,7 +3,7 @@
#include <cstdint>
#include <optional>
#include "AbstractMemoryAccessPacket.hpp"
#include "MemoryAccessCommandPacket.hpp"
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
{
@@ -11,15 +11,19 @@ namespace Bloom::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 AbstractMemoryAccessPacket
class ReadMemory: public MemoryAccessCommandPacket
{
public:
/**
* The startAddress sent from the GDB client will include additional bits used to indicate the memory type.
* These bits have to be removed from the address before it can be used as a start address.
* Start address of the memory operation.
*/
std::uint32_t startAddress = 0;
/**
* The type of memory to read from.
*/
Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::FLASH;
/**
* Number of bytes to read.
*/