LLDB  mainline
MemoryTagManagerAArch64MTE.h
Go to the documentation of this file.
1 //===-- MemoryTagManagerAArch64MTE.h ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_MEMORYTAGMANAGERAARCH64MTE_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_MEMORYTAGMANAGERAARCH64MTE_H
11 
13 
14 namespace lldb_private {
15 
17 public:
18  // This enum is supposed to be shared for all of AArch64 but until
19  // there are more tag types than MTE, it will live here.
20  enum MTETagTypes {
23  };
24 
25  lldb::addr_t GetGranuleSize() const override;
26  int32_t GetAllocationTagType() const override;
27  size_t GetTagSizeInBytes() const override;
28 
29  lldb::addr_t GetLogicalTag(lldb::addr_t addr) const override;
30  lldb::addr_t RemoveNonAddressBits(lldb::addr_t addr) const override;
31  ptrdiff_t AddressDiff(lldb::addr_t addr1, lldb::addr_t addr2) const override;
32 
33  TagRange ExpandToGranule(TagRange range) const override;
34 
35  llvm::Expected<TagRange> MakeTaggedRange(
36  lldb::addr_t addr, lldb::addr_t end_addr,
37  const lldb_private::MemoryRegionInfos &memory_regions) const override;
38 
39  llvm::Expected<std::vector<lldb::addr_t>>
40  UnpackTagsData(const std::vector<uint8_t> &tags,
41  size_t granules = 0) const override;
42 
43  llvm::Expected<std::vector<uint8_t>>
44  PackTags(const std::vector<lldb::addr_t> &tags) const override;
45 
46  llvm::Expected<std::vector<lldb::addr_t>>
47  RepeatTagsForRange(const std::vector<lldb::addr_t> &tags,
48  TagRange range) const override;
49 };
50 
51 } // namespace lldb_private
52 
53 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_MEMORYTAGMANAGERAARCH64MTE_H
lldb_private::MemoryTagManagerAArch64MTE::PackTags
llvm::Expected< std::vector< uint8_t > > PackTags(const std::vector< lldb::addr_t > &tags) const override
Definition: MemoryTagManagerAArch64MTE.cpp:159
lldb_private::MemoryTagManagerAArch64MTE::UnpackTagsData
llvm::Expected< std::vector< lldb::addr_t > > UnpackTagsData(const std::vector< uint8_t > &tags, size_t granules=0) const override
Definition: MemoryTagManagerAArch64MTE.cpp:127
lldb_private::MemoryTagManagerAArch64MTE::GetLogicalTag
lldb::addr_t GetLogicalTag(lldb::addr_t addr) const override
Definition: MemoryTagManagerAArch64MTE.cpp:18
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::MemoryTagManagerAArch64MTE::ExpandToGranule
TagRange ExpandToGranule(TagRange range) const override
Definition: MemoryTagManagerAArch64MTE.cpp:47
lldb_private::MemoryTagManager
Definition: MemoryTagManager.h:28
lldb_private::MemoryTagManagerAArch64MTE::MTETagTypes
MTETagTypes
Definition: MemoryTagManagerAArch64MTE.h:20
lldb_private::MemoryRegionInfos
Definition: MemoryRegionInfo.h:164
lldb_private::MemoryTagManagerAArch64MTE::GetAllocationTagType
int32_t GetAllocationTagType() const override
Definition: MemoryTagManagerAArch64MTE.cpp:40
lldb_private::MemoryTagManagerAArch64MTE::eMTE_logical
@ eMTE_logical
Definition: MemoryTagManagerAArch64MTE.h:21
lldb_private::MemoryTagManagerAArch64MTE::MakeTaggedRange
llvm::Expected< TagRange > MakeTaggedRange(lldb::addr_t addr, lldb::addr_t end_addr, const lldb_private::MemoryRegionInfos &memory_regions) const override
Definition: MemoryTagManagerAArch64MTE.cpp:70
lldb_private::MemoryTagManagerAArch64MTE::RemoveNonAddressBits
lldb::addr_t RemoveNonAddressBits(lldb::addr_t addr) const override
Definition: MemoryTagManagerAArch64MTE.cpp:23
lldb_private::MemoryTagManagerAArch64MTE::AddressDiff
ptrdiff_t AddressDiff(lldb::addr_t addr1, lldb::addr_t addr2) const override
Definition: MemoryTagManagerAArch64MTE.cpp:31
lldb_private::MemoryTagManagerAArch64MTE::RepeatTagsForRange
llvm::Expected< std::vector< lldb::addr_t > > RepeatTagsForRange(const std::vector< lldb::addr_t > &tags, TagRange range) const override
Definition: MemoryTagManagerAArch64MTE.cpp:178
lldb_private::MemoryTagManagerAArch64MTE::eMTE_allocation
@ eMTE_allocation
Definition: MemoryTagManagerAArch64MTE.h:22
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::MemoryTagManagerAArch64MTE::GetTagSizeInBytes
size_t GetTagSizeInBytes() const override
Definition: MemoryTagManagerAArch64MTE.cpp:44
lldb_private::MemoryTagManagerAArch64MTE
Definition: MemoryTagManagerAArch64MTE.h:16
MemoryTagManager.h
lldb_private::MemoryTagManagerAArch64MTE::GetGranuleSize
lldb::addr_t GetGranuleSize() const override
Definition: MemoryTagManagerAArch64MTE.cpp:36
lldb_private::MemoryTagManager::TagRange
Range< lldb::addr_t, lldb::addr_t > TagRange
Definition: MemoryTagManager.h:30