diff options
Diffstat (limited to 'include/lldb/Expression/IRMemoryMap.h')
-rw-r--r-- | include/lldb/Expression/IRMemoryMap.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/lldb/Expression/IRMemoryMap.h b/include/lldb/Expression/IRMemoryMap.h index affe19350e3f..4faa5226d9b4 100644 --- a/include/lldb/Expression/IRMemoryMap.h +++ b/include/lldb/Expression/IRMemoryMap.h @@ -27,7 +27,8 @@ namespace lldb_private /// This class encapsulates a group of memory objects that must be readable /// or writable from the host process regardless of whether the process /// exists. This allows the IR interpreter as well as JITted code to access -/// the same memory. +/// the same memory. All allocations made by this class are represented as +/// disjoint intervals. /// /// Point queries against this group of memory objects can be made by the /// address in the tar at which they reside. If the inferior does not @@ -66,7 +67,7 @@ public: uint32_t GetAddressByteSize(); // This function can return NULL. - ExecutionContextScope *GetBestExecutionContextScope(); + ExecutionContextScope *GetBestExecutionContextScope() const; protected: // This function should only be used if you know you are using the JIT. @@ -118,7 +119,12 @@ private: lldb::addr_t FindSpace (size_t size); bool ContainsHostOnlyAllocations (); AllocationMap::iterator FindAllocation (lldb::addr_t addr, size_t size); - bool IntersectsAllocation (lldb::addr_t addr, size_t size); + + // Returns true if the given allocation intersects any allocation in the memory map. + bool IntersectsAllocation (lldb::addr_t addr, size_t size) const; + + // Returns true if the two given allocations intersect each other. + static bool AllocationsIntersect (lldb::addr_t addr1, size_t size1, lldb::addr_t addr2, size_t size2); }; } |