10 #ifndef LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H 11 #define LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H 24 struct DWARFAttribute;
28 class DWARFCompileUnit;
29 class DWARFDataExtractor;
30 class DWARFDebugAbbrev;
42 std::vector<DWARFAddressRange>
Ranges;
52 : Ranges(
std::move(Ranges)) {}
54 typedef std::vector<DWARFAddressRange>::const_iterator
67 auto Begin = Ranges.begin();
68 auto End = Ranges.end();
69 auto Iter = std::upper_bound(Begin, End, R);
97 std::map<uint64_t, std::set<uint32_t>> ReferenceToDIEOffsets;
138 bool &isUnitDWARF64);
155 bool verifyUnitContents(
DWARFUnit &Unit, uint8_t UnitType = 0);
176 unsigned verifyDebugInfoAttribute(
const DWARFDie &Die,
203 unsigned verifyDebugInfoReferences();
207 void verifyDebugLineStmtOffsets();
214 void verifyDebugLineRows();
233 unsigned verifyAppleAccelTable(
const DWARFSection *AccelSection,
246 unsigned verifyNameIndexCompleteness(
const DWARFDie &Die,
266 unsigned verifyDebugNames(
const DWARFSection &AccelSection,
272 : OS(S), DCtx(D), DumpOpts(
std::move(DumpOpts)) {}
316 #endif // LLVM_DEBUGINFO_DWARF_DWARFCONTEXT_H
Compute iterated dominance frontiers using a linear time algorithm.
This class holds an abstract representation of an Accelerator Table, consisting of a sequence of buck...
bool handleDebugLine()
Verify the information in the .debug_line section.
Abbreviation describing the encoding of Name Index entries.
bool handleDebugInfo()
Verify the information in the .debug_info section.
Index attribute and its encoding.
std::set< DieRangeInfo > Children
Sorted DWARFAddressRangeInfo.
std::vector< DWARFAddressRange > Ranges
Sorted DWARFAddressRanges.
Encapsulates a DWARF attribute value and all of the data required to describe the attribute value...
DieRangeInfo(DWARFDie Die)
Represents a single accelerator table within the Dwarf 5 .debug_names section.
Container for dump options that control which debug information will be dumped.
address_range_iterator findRange(const DWARFAddressRange &R) const
Finds an address range in the sorted vector of ranges.
Utility class that carries the DWARF compile/type unit and the debug info entry in an object...
bool handleDebugAbbrev()
Verify the information in any of the following sections, if available: .debug_abbrev, debug_abbrev.dwo.
A class that keeps the address range information for a single DIE.
bool contains(const DieRangeInfo &RHS) const
Return true if ranges in this object contains all ranges within RHS.
DieRangeInfo(std::vector< DWARFAddressRange > Ranges)
Used for unit testing.
std::vector< DWARFAddressRange >::const_iterator address_range_iterator
UnitType
Constants for unit types in DWARF v5.
.debug_names section consists of one or more units.
A single entry in the Name Table (Dwarf 5 sect.
address_range_iterator insert(const DWARFAddressRange &R)
Inserts the address range.
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
bool intersects(const DieRangeInfo &RHS) const
Return true if any range in this object intersects with any range in RHS.
A class that verifies DWARF debug information given a DWARF Context.
DWARFVerifier(raw_ostream &S, DWARFContext &D, DIDumpOptions DumpOpts=DIDumpOptions::getForSingleDIE())
bool handleAccelTables()
Verify the information in accelerator tables, if they exist.
std::set< DieRangeInfo >::const_iterator die_range_info_iterator
static DIDumpOptions getForSingleDIE()
Return default option set for printing a single DIE without children.
bool operator<(int64_t V1, const APSInt &V2)
This class implements an extremely fast bulk output stream that can only output to a stream...