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
14namespace lldb_private {
15
17public:
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.
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 RemoveTagBits(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<TagRange>> MakeTaggedRanges(
40 lldb::addr_t addr, lldb::addr_t end_addr,
41 const lldb_private::MemoryRegionInfos &memory_regions) const override;
42
43 llvm::Expected<std::vector<lldb::addr_t>>
44 UnpackTagsData(const std::vector<uint8_t> &tags,
45 size_t granules = 0) const override;
46
47 std::vector<lldb::addr_t>
49 lldb::addr_t tag_segment_virtual_address,
50 lldb::addr_t tag_segment_data_address,
51 lldb::addr_t addr, size_t len) const override;
52
53 llvm::Expected<std::vector<uint8_t>>
54 PackTags(const std::vector<lldb::addr_t> &tags) const override;
55
56 llvm::Expected<std::vector<lldb::addr_t>>
57 RepeatTagsForRange(const std::vector<lldb::addr_t> &tags,
58 TagRange range) const override;
59};
60
61} // namespace lldb_private
62
63#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_MEMORYTAGMANAGERAARCH64MTE_H
lldb::addr_t GetLogicalTag(lldb::addr_t addr) const override
llvm::Expected< std::vector< lldb::addr_t > > RepeatTagsForRange(const std::vector< lldb::addr_t > &tags, TagRange range) const override
std::vector< lldb::addr_t > UnpackTagsFromCoreFileSegment(CoreReaderFn reader, lldb::addr_t tag_segment_virtual_address, lldb::addr_t tag_segment_data_address, lldb::addr_t addr, size_t len) const override
ptrdiff_t AddressDiff(lldb::addr_t addr1, lldb::addr_t addr2) const override
lldb::addr_t RemoveTagBits(lldb::addr_t addr) const override
TagRange ExpandToGranule(TagRange range) const override
llvm::Expected< TagRange > MakeTaggedRange(lldb::addr_t addr, lldb::addr_t end_addr, const lldb_private::MemoryRegionInfos &memory_regions) const override
llvm::Expected< std::vector< lldb::addr_t > > UnpackTagsData(const std::vector< uint8_t > &tags, size_t granules=0) const override
llvm::Expected< std::vector< uint8_t > > PackTags(const std::vector< lldb::addr_t > &tags) const override
llvm::Expected< std::vector< TagRange > > MakeTaggedRanges(lldb::addr_t addr, lldb::addr_t end_addr, const lldb_private::MemoryRegionInfos &memory_regions) const override
std::function< size_t(lldb::offset_t, size_t, void *)> CoreReaderFn
Range< lldb::addr_t, lldb::addr_t > TagRange
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
uint64_t addr_t
Definition: lldb-types.h:80