10 #ifndef LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H 11 #define LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H 25 struct DWARFAttribute;
29 class DWARFCompileUnit;
30 class DWARFDataExtractor;
31 class DWARFDebugAbbrev;
43 std::vector<DWARFAddressRange>
Ranges;
53 : Ranges(
std::move(Ranges)) {}
55 typedef std::vector<DWARFAddressRange>::const_iterator
68 auto Begin = Ranges.begin();
69 auto End = Ranges.end();
98 std::map<uint64_t, std::set<uint32_t>> ReferenceToDIEOffsets;
143 bool &isUnitDWARF64);
176 unsigned verifyDebugInfoCallSite(
const DWARFDie &Die);
197 unsigned verifyDebugInfoAttribute(
const DWARFDie &Die,
224 unsigned verifyDebugInfoReferences();
228 void verifyDebugLineStmtOffsets();
235 void verifyDebugLineRows();
254 unsigned verifyAppleAccelTable(
const DWARFSection *AccelSection,
267 unsigned verifyNameIndexCompleteness(
const DWARFDie &Die,
287 unsigned verifyDebugNames(
const DWARFSection &AccelSection,
337 #endif // LLVM_DEBUGINFO_DWARF_DWARFCONTEXT_H
This class represents lattice values for constants.
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 and .debug_types sections.
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...
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
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.
SectionKind - This is a simple POD value that classifies the properties of a section.
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.
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.
auto upper_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...
bool operator<(int64_t V1, const APSInt &V2)
DWARFVerifier(raw_ostream &S, DWARFContext &D, DIDumpOptions DumpOpts=DIDumpOptions::getForSingleDIE())
This class implements an extremely fast bulk output stream that can only output to a stream...