Convert relative EEPROM addresses to absolute addresses in GDB memory access command packet handlers.

This commit is contained in:
Nav
2022-12-11 15:26:14 +00:00
parent b2fc7f4953
commit deec72d168
2 changed files with 10 additions and 0 deletions

View File

@@ -78,6 +78,11 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
const auto& memoryDescriptor = memoryDescriptorIt->second;
if (this->memoryType == Targets::TargetMemoryType::EEPROM) {
// GDB sends EEPROM addresses in relative form - we convert them to absolute form, here.
this->startAddress = memoryDescriptor.addressRange.startAddress + this->startAddress;
}
/*
* In AVR targets, RAM is mapped to many registers and peripherals - we don't want to block GDB from
* accessing them.