LLVM 22.0.0git
DWARFDebugRnglists.h
Go to the documentation of this file.
1//===- DWARFDebugRnglists.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 LLVM_DEBUGINFO_DWARF_DWARFDEBUGRNGLISTS_H
10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGRNGLISTS_H
11
17#include <cstdint>
18
19namespace llvm {
20
21class Error;
22class raw_ostream;
23class DWARFUnit;
25struct DIDumpOptions;
26namespace object {
27struct SectionedAddress;
28}
29
30/// A class representing a single range list entry.
32 /// The values making up the range list entry. Most represent a range with
33 /// a start and end address or a start address and a length. Others are
34 /// single value base addresses or end-of-list with no values. The unneeded
35 /// values are semantically undefined, but initialized to 0.
38
40 LLVM_ABI void
41 dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength,
42 uint64_t &CurrentBase, DIDumpOptions DumpOpts,
43 llvm::function_ref<std::optional<object::SectionedAddress>(uint32_t)>
44 LookupPooledAddress) const;
45 bool isSentinel() const { return EntryKind == dwarf::DW_RLE_end_of_list; }
46};
47
48/// A class representing a single rangelist.
49class DWARFDebugRnglist : public DWARFListType<RangeListEntry> {
50public:
51 /// Build a DWARFAddressRangesVector from a rangelist.
53 std::optional<object::SectionedAddress> BaseAddr, uint8_t AddressByteSize,
54 function_ref<std::optional<object::SectionedAddress>(uint32_t)>
55 LookupPooledAddress) const;
56
57 /// Build a DWARFAddressRangesVector from a rangelist.
59 std::optional<object::SectionedAddress> BaseAddr, DWARFUnit &U) const;
60};
61
62class DWARFDebugRnglistTable : public DWARFListTableBase<DWARFDebugRnglist> {
63public:
65 : DWARFListTableBase(/* SectionName = */ ".debug_rnglists",
66 /* HeaderString = */ "ranges:",
67 /* ListTypeString = */ "range") {}
68};
69
70} // end namespace llvm
71
72#endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGRNGLISTS_H
#define LLVM_ABI
Definition Compiler.h:213
This file contains constants used for implementing Dwarf debug support.
loop extract
A DWARFDataExtractor (typically for an in-memory copy of an object-file section) plus a relocation ma...
A class representing a single rangelist.
LLVM_ABI DWARFAddressRangesVector getAbsoluteRanges(std::optional< object::SectionedAddress > BaseAddr, uint8_t AddressByteSize, function_ref< std::optional< object::SectionedAddress >(uint32_t)> LookupPooledAddress) const
Build a DWARFAddressRangesVector from a rangelist.
DWARFListTableBase(StringRef SectionName, StringRef HeaderString, StringRef ListTypeString)
A base class for lists of entries that are extracted from a particular section, such as range lists o...
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
Definition InstrProf.h:189
std::vector< DWARFAddressRange > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
Container for dump options that control which debug information will be dumped.
Definition DIContext.h:196
A base class for DWARF list entries, such as range or location list entries.
uint8_t EntryKind
The DWARF encoding (DW_RLE_* or DW_LLE_*).
A class representing a single range list entry.
LLVM_ABI void dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength, uint64_t &CurrentBase, DIDumpOptions DumpOpts, llvm::function_ref< std::optional< object::SectionedAddress >(uint32_t)> LookupPooledAddress) const
uint64_t Value0
The values making up the range list entry.