Removed MemoryAccessCommandPacket class and moved GDB memory offsets to GDB TargetDescriptor class

This commit is contained in:
Nav
2022-08-30 02:04:35 +01:00
parent fd68089214
commit 2ae3786130
16 changed files with 114 additions and 92 deletions

View File

@@ -43,11 +43,11 @@ namespace Bloom::DebugServer::Gdb::AvrGdb
if (rawPacket.size() >= 2) {
if (rawPacket[1] == 'm') {
return std::make_unique<ReadMemory>(rawPacket);
return std::make_unique<ReadMemory>(rawPacket, this->gdbTargetDescriptor.value());
}
if (rawPacket[1] == 'M') {
return std::make_unique<WriteMemory>(rawPacket);
return std::make_unique<WriteMemory>(rawPacket, this->gdbTargetDescriptor.value());
}
const auto rawPacketString = std::string(rawPacket.begin() + 1, rawPacket.end());