Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
DWARFDebugArangeSet.h
Go to the documentation of this file.
1//===- DWARFDebugArangeSet.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_DWARFDEBUGARANGESET_H
10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGARANGESET_H
11
15#include "llvm/Support/Error.h"
16#include <cstdint>
17#include <vector>
18
19namespace llvm {
20
21class raw_ostream;
23
25public:
26 struct Header {
27 /// The total length of the entries for that set, not including the length
28 /// field itself.
30 /// The DWARF format of the set.
32 /// The offset from the beginning of the .debug_info section of the
33 /// compilation unit entry referenced by the table.
35 /// The DWARF version number.
37 /// The size in bytes of an address on the target architecture. For segmented
38 /// addressing, this is the size of the offset portion of the address.
40 /// The size in bytes of a segment descriptor on the target architecture.
41 /// If the target system uses a flat address space, this value is 0.
43 };
44
45 struct Descriptor {
48
49 uint64_t getEndAddress() const { return Address + Length; }
50 LLVM_ABI void dump(raw_ostream &OS, uint32_t AddressSize) const;
51 };
52
53private:
54 using DescriptorColl = std::vector<Descriptor>;
55 using desc_iterator_range = iterator_range<DescriptorColl::const_iterator>;
56
58 Header HeaderData;
59 DescriptorColl ArangeDescriptors;
60
61public:
63
64 LLVM_ABI void clear();
66 function_ref<void(Error)> WarningHandler = nullptr);
67 LLVM_ABI void dump(raw_ostream &OS) const;
68
69 uint64_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; }
70
71 const Header &getHeader() const { return HeaderData; }
72
73 desc_iterator_range descriptors() const {
74 return desc_iterator_range(ArangeDescriptors.begin(),
75 ArangeDescriptors.end());
76 }
77};
78
79} // end namespace llvm
80
81#endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGARANGESET_H
#define LLVM_ABI
Definition Compiler.h:213
This file contains constants used for implementing Dwarf debug support.
loop extract
static Split data
A DWARFDataExtractor (typically for an in-memory copy of an object-file section) plus a relocation ma...
uint64_t getCompileUnitDIEOffset() const
const Header & getHeader() const
LLVM_ABI void dump(raw_ostream &OS) const
desc_iterator_range descriptors() const
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
An efficient, type-erasing, non-owning reference to a callable.
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition Dwarf.h:93
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:477
LLVM_ABI void dump(raw_ostream &OS, uint32_t AddressSize) const
uint16_t Version
The DWARF version number.
uint64_t CuOffset
The offset from the beginning of the .debug_info section of the compilation unit entry referenced by ...
uint8_t AddrSize
The size in bytes of an address on the target architecture.
uint64_t Length
The total length of the entries for that set, not including the length field itself.
uint8_t SegSize
The size in bytes of a segment descriptor on the target architecture.
dwarf::DwarfFormat Format
The DWARF format of the set.