Fixed bug with driver-side exclusions for memory reads, in the EdbgAvr8Interface.

The driver was issuing memory reads for 0 bytes. This was causing issues with some EDBG debug tools.
This commit is contained in:
Nav
2021-12-25 20:59:29 +00:00
parent 1051954333
commit 82c036cc22

View File

@@ -1233,13 +1233,17 @@ TargetMemoryBuffer EdbgAvr8Interface::readMemory(
continue; continue;
} }
auto segmentBuffer = this->readMemory( const auto segmentSize = excludedAddress - segmentStartAddress;
type, if (segmentSize > 0) {
segmentStartAddress, auto segmentBuffer = this->readMemory(
(excludedAddress - segmentStartAddress) type,
); segmentStartAddress,
segmentSize
);
output.insert(output.end(), segmentBuffer.begin(), segmentBuffer.end());
}
output.insert(output.end(), segmentBuffer.begin(), segmentBuffer.end());
output.emplace_back(0x00); output.emplace_back(0x00);
segmentStartAddress = excludedAddress + 1; segmentStartAddress = excludedAddress + 1;