15 : m_manager(manager) {
16 assert(
m_manager &&
"valid tag manager required to construct a MemoryTagMap");
20 const std::vector<lldb::addr_t> tags) {
23 for (
auto tag : tags) {
31std::vector<std::optional<lldb::addr_t>>
38 std::vector<std::optional<lldb::addr_t>> tags;
41 bool got_valid_tags =
false;
44 for (; addr < end_addr; addr += granule_size) {
45 std::optional<lldb::addr_t> tag =
GetTag(addr);
48 got_valid_tags =
true;
virtual TagRange ExpandToGranule(TagRange range) const =0
virtual lldb::addr_t GetGranuleSize() const =0
virtual lldb::addr_t RemoveTagBits(lldb::addr_t addr) const =0
std::optional< lldb::addr_t > GetTag(lldb::addr_t addr) const
Lookup the tag for address.
MemoryTagMap(const MemoryTagManager *manager)
Init an empty tag map.
std::map< lldb::addr_t, lldb::addr_t > m_addr_to_tag
std::vector< std::optional< lldb::addr_t > > GetTags(lldb::addr_t addr, size_t len) const
Lookup memory tags for a range of memory from addr to addr+len.
void InsertTags(lldb::addr_t addr, const std::vector< lldb::addr_t > tags)
Insert tags into the map starting from addr.
const MemoryTagManager * m_manager
A class that represents a running process on the host machine.
BaseType GetRangeBase() const
BaseType GetRangeEnd() const