diff --git a/src/Targets/TargetMemory.hpp b/src/Targets/TargetMemory.hpp index b9bb0d07..f49f6e4d 100644 --- a/src/Targets/TargetMemory.hpp +++ b/src/Targets/TargetMemory.hpp @@ -46,6 +46,10 @@ namespace Targets return this->startAddress < rhs.startAddress; } + TargetMemorySize size() const { + return this->endAddress - this->startAddress + 1; + } + [[nodiscard]] bool intersectsWith(const TargetMemoryAddressRange& other) const { return (other.startAddress <= this->startAddress && other.endAddress >= this->startAddress)