2023-05-21 21:08:25 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
|
|
#include "src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp"
|
|
|
|
|
|
|
|
|
|
#include "src/DebugServer/Gdb/RegisterDescriptor.hpp"
|
2024-07-23 21:14:22 +01:00
|
|
|
#include "src/DebugServer/Gdb/AvrGdb/TargetDescriptor.hpp"
|
|
|
|
|
#include "src/Targets/TargetMemorySegmentDescriptor.hpp"
|
2023-05-21 21:08:25 +01:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
2023-05-21 21:08:25 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The ReadRegisters class implements a structure for the "g" command packet. In response to this packet, the
|
|
|
|
|
* server is expected to send register values for all registers.
|
|
|
|
|
*/
|
|
|
|
|
class ReadRegisters: public Gdb::CommandPackets::CommandPacket
|
|
|
|
|
{
|
|
|
|
|
public:
|
2024-07-23 21:14:22 +01:00
|
|
|
const Targets::TargetMemorySegmentDescriptor& gpRegistersMemorySegmentDescriptor;
|
|
|
|
|
|
|
|
|
|
explicit ReadRegisters(const RawPacket& rawPacket, const TargetDescriptor& gdbTargetDescriptor);
|
2023-05-21 21:08:25 +01:00
|
|
|
|
|
|
|
|
void handle(
|
2023-09-10 22:27:10 +01:00
|
|
|
Gdb::DebugSession& debugSession,
|
2024-07-23 21:14:22 +01:00
|
|
|
const Gdb::TargetDescriptor& gdbTargetDescriptor,
|
|
|
|
|
const Targets::TargetDescriptor& targetDescriptor,
|
2023-05-21 21:08:25 +01:00
|
|
|
Services::TargetControllerService& targetControllerService
|
|
|
|
|
) override;
|
|
|
|
|
};
|
|
|
|
|
}
|