Refactored GDB server base class, making it a template class, allowing for much more flexibility for derived target-specific implementations
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
|
||||
#include "src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp"
|
||||
#include "src/DebugServer/Gdb/TargetDescriptor.hpp"
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
@@ -14,17 +13,17 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
* The FlashWrite class implements the structure for the "vFlashWrite" packet. Upon receiving this packet, the
|
||||
* server is expected to write to a particular region of the target's flash memory.
|
||||
*/
|
||||
class FlashWrite: public Gdb::CommandPackets::CommandPacket
|
||||
class FlashWrite: public CommandPackets::CommandPacket
|
||||
{
|
||||
public:
|
||||
std::uint32_t startAddress = 0;
|
||||
Targets::TargetMemoryAddress startAddress;
|
||||
Targets::TargetMemoryBuffer buffer;
|
||||
|
||||
explicit FlashWrite(const RawPacket& rawPacket);
|
||||
|
||||
void handle(
|
||||
Gdb::DebugSession& debugSession,
|
||||
const Gdb::TargetDescriptor& gdbTargetDescriptor,
|
||||
DebugSession& debugSession,
|
||||
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
) override;
|
||||
|
||||
Reference in New Issue
Block a user