LLVM  7.0.0
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 
18 #include <cstdint>
19 #include <map>
20 #include <vector>
21 
22 namespace llvm {
23 
24 class Error;
25 class raw_ostream;
26 
27 /// A class representing a single range list entry.
29  /// The values making up the range list entry. Most represent a range with
30  /// a start and end address or a start address and a length. Others are
31  /// single value base addresses or end-of-list with no values. The unneeded
32  /// values are semantically undefined, but initialized to 0.
33  uint64_t Value0;
34  uint64_t Value1;
35 
37  void dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength,
38  uint64_t &CurrentBase, DIDumpOptions DumpOpts) const;
39  bool isSentinel() const { return EntryKind == dwarf::DW_RLE_end_of_list; }
40 };
41 
42 /// A class representing a single rangelist.
43 class DWARFDebugRnglist : public DWARFListType<RangeListEntry> {
44 public:
45  /// Build a DWARFAddressRangesVector from a rangelist.
47  getAbsoluteRanges(llvm::Optional<BaseAddress> BaseAddr) const;
48 };
49 
50 class DWARFDebugRnglistTable : public DWARFListTableBase<DWARFDebugRnglist> {
51 public:
53  : DWARFListTableBase(/* SectionName = */ ".debug_rnglists",
54  /* HeaderString = */ "ranges:",
55  /* ListTypeString = */ "range") {}
56 };
57 
58 } // end namespace llvm
59 
60 #endif // LLVM_DEBUGINFO_DWARFDEBUGRNGLISTS_H
uint64_t Value0
The values making up the range list entry.
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
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:154
A class representing a single rangelist.
A DataExtractor (typically for an in-memory copy of an object-file section) plus a relocation map for...
void dump(raw_ostream &OS, uint8_t AddrSize, uint8_t MaxEncodingStringLength, uint64_t &CurrentBase, DIDumpOptions DumpOpts) const
This file contains constants used for implementing Dwarf debug support.
std::vector< DWARFAddressRange > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
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)