Lots of tidying

This commit is contained in:
Nav
2022-12-03 22:16:21 +00:00
parent df36d9d698
commit b3fb3f0955
26 changed files with 743 additions and 550 deletions

View File

@@ -65,8 +65,9 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
try {
const auto& memoryDescriptorsByType = debugSession.gdbTargetDescriptor.targetDescriptor.memoryDescriptorsByType;
const auto memoryDescriptorIt = memoryDescriptorsByType.find(this->memoryType);
if (!memoryDescriptorsByType.contains(this->memoryType)) {
if (memoryDescriptorIt == memoryDescriptorsByType.end()) {
throw Exception("Target does not support the requested memory type.");
}
@@ -75,7 +76,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
return;
}
const auto& memoryDescriptor = memoryDescriptorsByType.at(this->memoryType);
const auto& memoryDescriptor = memoryDescriptorIt->second;
/*
* In AVR targets, RAM is mapped to many registers and peripherals - we don't want to block GDB from