MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetRegionAtAddress

Method GetRegionAtAddress

view/sharedcache/core/VirtualMemory.cpp:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22std::optional<VirtualMemoryRegion> VirtualMemory::GetRegionAtAddress(uint64_t address, uint64_t& addressOffset)
23{
24 if (const auto& it = m_regions.find(address); it != m_regions.end())
25 {
26 // The VirtualMemoryRegion object returned contains the page, and more importantly, the file pointer (there can
27 // be multiple in newer caches) This is relevant for reading out the data in the rest of this file. The second
28 // item in the returned pair is the offset of `address` within the file.
29 const auto& range = it->first;
30 auto mapping = it->second;
31 addressOffset = mapping.fileOffset + (address - range.start);
32 return mapping;
33 }
34
35 return std::nullopt;
36}
37
38std::optional<VirtualMemoryRegion> VirtualMemory::GetRegionAtAddress(uint64_t address)
39{

Callers 4

ReadCStringMethod · 0.80
ReadULEB128Method · 0.80
ReadSLEB128Method · 0.80
ProcessEntrySlideInfoMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected