LLVM  8.0.1
DWARFDebugRnglists.h
Go to the documentation of this file.
1 //===- DWARFDebugRnglists.h -------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_DWARFDEBUGRNGLISTS_H
11 #define LLVM_DEBUGINFO_DWARFDEBUGRNGLISTS_H
12 
13 #include "llvm/ADT/Optional.h"
19 #include <cstdint>
20 #include <map>
21 #include <vector>
22 
23 namespace llvm {
24 
25 class Error;
26 class raw_ostream;
27 class DWARFUnit;
28 
29 /// A class representing a single range list entry.
31  /// The values making up the range list entry. Most represent a range with
32  /// a start and end address or a start address and a length. Others are
33  /// single value base addresses or end-of-list with no values. The unneeded
34  /// values are semantically undefined, but initialized to 0.
35  uint64_t Value0;
36  uint64_t Value1;
37 
39  void dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength,
40  uint64_t &CurrentBase, DIDumpOptions DumpOpts,
42  LookupPooledAddress) const;
43  bool isSentinel() const { return EntryKind == dwarf::DW_RLE_end_of_list; }
44 };
45 
46 /// A class representing a single rangelist.
47 class DWARFDebugRnglist : public DWARFListType<RangeListEntry> {
48 public:
49  /// Build a DWARFAddressRangesVector from a rangelist.
51  getAbsoluteRanges(llvm::Optional<SectionedAddress> BaseAddr,
52  DWARFUnit &U) const;
53 };
54 
55 class DWARFDebugRnglistTable : public DWARFListTableBase<DWARFDebugRnglist> {
56 public:
58  : DWARFListTableBase(/* SectionName = */ ".debug_rnglists",
59  /* HeaderString = */ "ranges:",
60  /* ListTypeString = */ "range") {}
61 };
62 
63 } // end namespace llvm
64 
65 #endif // LLVM_DEBUGINFO_DWARFDEBUGRNGLISTS_H
uint64_t Value0
The values making up the range list entry.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLExtras.h:117
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_*).
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:159
A class representing a single rangelist.
A DataExtractor (typically for an in-memory copy of an object-file section) plus a relocation map for...
This file contains constants used for implementing Dwarf debug support.
void dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength, uint64_t &CurrentBase, DIDumpOptions DumpOpts, llvm::function_ref< Optional< SectionedAddress >(uint32_t)> LookupPooledAddress) const
std::vector< DWARFAddressRange > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
A class representing a single range list entry.
A base class for lists of entries that are extracted from a particular section, such as range lists o...
A class representing a table of lists as specified in the DWARF v5 standard for location lists and ra...
Error extract(DWARFDataExtractor Data, uint32_t End, uint32_t *OffsetPtr)