From 71842358ff50e19d4f62f2174445be1e6f75329d Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 25 Dec 2021 21:01:45 +0000 Subject: [PATCH] Excluding excluded memory regions from memory reads in the hex viewer widget. --- .../TargetMemoryInspectionPane.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index 447058fc..1f125fa6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -98,10 +98,21 @@ void TargetMemoryInspectionPane::refreshMemoryValues(std::optionalhexViewerWidget->refreshButton->setDisabled(true); this->hexViewerWidget->refreshButton->startSpin(); + auto excludedAddressRanges = std::set(); + std::transform( + this->settings.excludedMemoryRegions.begin(), + this->settings.excludedMemoryRegions.end(), + std::inserter(excludedAddressRanges, excludedAddressRanges.begin()), + [] (const ExcludedMemoryRegion& excludedRegion) { + return excludedRegion.getAbsoluteAddressRange(); + } + ); + auto* readMemoryTask = new ReadTargetMemory( this->targetMemoryDescriptor.type, this->targetMemoryDescriptor.addressRange.startAddress, - this->targetMemoryDescriptor.size() + this->targetMemoryDescriptor.size(), + excludedAddressRanges ); QObject::connect(