|
LLDB mainline
|
#include <MemoryRegionInfoCache.h>
Public Member Functions | |
| MemoryRegionInfoCache ()=default | |
| void | Clear () |
| Remove all cached entries. | |
| std::optional< MemoryRegionInfo > | GetMemoryRegion (lldb::addr_t load_addr) |
Return a MemoryRegionInfo that covers load_addr, returns empty optional if there is no entry. | |
| void | AddRegion (const MemoryRegionInfo ®ion_info) |
| Add a MemoryRegionInfo to the collection. | |
| size_t | GetSize () |
Private Attributes | |
| std::map< lldb::addr_t, MemoryRegionInfo > | m_region_infos |
| std::mutex | m_mutex |
Definition at line 19 of file MemoryRegionInfoCache.h.
|
default |
| void MemoryRegionInfoCache::AddRegion | ( | const MemoryRegionInfo & | region_info | ) |
Add a MemoryRegionInfo to the collection.
Definition at line 38 of file MemoryRegionInfoCache.cpp.
References lldb_private::MemoryRegionInfo::GetRange(), lldb_private::Range< B, S >::GetRangeBase(), m_mutex, and m_region_infos.
| void MemoryRegionInfoCache::Clear | ( | ) |
Remove all cached entries.
Should be called whenever Process resumes execution of the inferior.
Definition at line 15 of file MemoryRegionInfoCache.cpp.
References m_mutex, and m_region_infos.
| std::optional< MemoryRegionInfo > MemoryRegionInfoCache::GetMemoryRegion | ( | lldb::addr_t | load_addr | ) |
Return a MemoryRegionInfo that covers load_addr, returns empty optional if there is no entry.
Definition at line 26 of file MemoryRegionInfoCache.cpp.
References m_mutex, and m_region_infos.
| size_t MemoryRegionInfoCache::GetSize | ( | ) |
Definition at line 20 of file MemoryRegionInfoCache.cpp.
References m_mutex, and m_region_infos.
|
private |
Definition at line 38 of file MemoryRegionInfoCache.h.
Referenced by AddRegion(), Clear(), GetMemoryRegion(), and GetSize().
|
private |
Definition at line 37 of file MemoryRegionInfoCache.h.
Referenced by AddRegion(), Clear(), GetMemoryRegion(), and GetSize().