summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SlideInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/sharedcache/core/SlideInfo.cpp')
-rw-r--r--view/sharedcache/core/SlideInfo.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/view/sharedcache/core/SlideInfo.cpp b/view/sharedcache/core/SlideInfo.cpp
index e258a90c..3ab83d33 100644
--- a/view/sharedcache/core/SlideInfo.cpp
+++ b/view/sharedcache/core/SlideInfo.cpp
@@ -16,12 +16,6 @@ void ApplySlideInfoV5(VirtualMemory& vm, const SlideMappingInfo& mapping)
uint64_t pageStartCount = mapping.slideInfoV5.page_starts_count;
uint64_t pageSize = mapping.slideInfoV5.page_size;
- uint64_t offset;
- // Retrieve this once so we don't need to keep querying the region through the VM.
- auto region = vm.GetRegionAtAddress(mapping.address, offset);
- if (!region.has_value())
- throw UnmappedRegionException(mapping.address);
-
auto cursor = pageStartsOffset;
for (size_t i = 0; i < pageStartCount; i++)
{
@@ -198,6 +192,10 @@ std::vector<SlideMappingInfo> SlideInfoProcessor::ReadEntryInfo(VirtualMemory& v
else if (singleMapping.slideInfoVersion == 3)
vm.Read(&singleMapping.slideInfoV3, *slideInfoAddress, sizeof(dyld_cache_slide_info_v3));
+ // Adjust the file offset to mapped, we are expecting the consumer to just take it in as mapped.
+ // if we did not make it mapped, then we would need to do all this weirdness in every consumer (each slide info version)
+ singleMapping.mappingInfo.fileOffset = *entry.GetMappedAddress(singleMapping.mappingInfo.fileOffset);
+
return {singleMapping};
}