9 #ifndef LLVM_DEBUGINFO_DWARF_DWARFVERIFIER_H 10 #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();
97 std::map<uint64_t, std::set<uint64_t>> ReferenceToDIEOffsets;
142 bool &isUnitDWARF64);
159 unsigned verifyUnitContents(
DWARFUnit &Unit);
175 unsigned verifyDebugInfoCallSite(
const DWARFDie &Die);
196 unsigned verifyDebugInfoAttribute(
const DWARFDie &Die,
223 unsigned verifyDebugInfoReferences();
227 void verifyDebugLineStmtOffsets();
234 void verifyDebugLineRows();
253 unsigned verifyAppleAccelTable(
const DWARFSection *AccelSection,
266 unsigned verifyNameIndexCompleteness(
const DWARFDie &Die,
286 unsigned verifyDebugNames(
const DWARFSection &AccelSection,
336 #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 v5 .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 v5 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.
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...
auto upper_bound(R &&Range, T &&Value) -> decltype(adl_begin(Range))
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...