Lines Matching defs:Die

228 bool DWARFVerifier::verifyName(const DWARFDie &Die) {
235 Die.getFullName(OS, &OriginalFullName);
247 dump(Die) << '\n';
248 dump(Die.getDwarfUnit()->getUnitDIE()) << '\n';
259 auto Die = Unit.getDIEAtIndex(I);
261 if (Die.getTag() == DW_TAG_null)
264 for (auto AttrValue : Die.attributes()) {
265 NumUnitErrors += verifyDebugInfoAttribute(Die, AttrValue);
266 NumUnitErrors += verifyDebugInfoForm(Die, AttrValue, UnitLocalReferences,
270 NumUnitErrors += verifyName(Die);
272 if (Die.hasChildren()) {
273 if (Die.getFirstChild().isValid() &&
274 Die.getFirstChild().getTag() == DW_TAG_null) {
275 warn() << dwarf::TagString(Die.getTag())
277 Die.dump(OS);
281 NumUnitErrors += verifyDebugInfoCallSite(Die);
284 DWARFDie Die = Unit.getUnitDIE(/* ExtractUnitDIEOnly = */ false);
285 if (!Die) {
293 if (!dwarf::isUnitType(Die.getTag())) {
296 << dwarf::TagString(Die.getTag()) << ".\n";
302 if (!DWARFUnit::isMatchingUnitTypeAndTag(UnitType, Die.getTag())) {
305 << ") and root DIE (" << dwarf::TagString(Die.getTag())
314 if (Die.getTag() == dwarf::DW_TAG_skeleton_unit && Die.hasChildren()) {
322 NumUnitErrors += verifyDieRanges(Die, RI);
327 unsigned DWARFVerifier::verifyDebugInfoCallSite(const DWARFDie &Die) {
328 if (Die.getTag() != DW_TAG_call_site && Die.getTag() != DW_TAG_GNU_call_site)
331 DWARFDie Curr = Die.getParent();
332 for (; Curr.isValid() && !Curr.isSubprogramDIE(); Curr = Die.getParent()) {
347 Die.dump(OS);
362 Die.dump(OS, /*indent*/ 1);
559 unsigned DWARFVerifier::verifyDieRanges(const DWARFDie &Die,
563 if (!Die.isValid())
566 DWARFUnit *Unit = Die.getDwarfUnit();
568 auto RangesOrError = Die.getAddressRanges();
580 DieRangeInfo RI(Die);
588 // In such a case, when the Die is the CU, the ranges will overlap, and we
601 if (!IsObjectFile || IsMachOObject || Die.getTag() != DW_TAG_compile_unit) {
629 dump(Die, 2) << '\n';
638 dump(Die);
639 dump(IntersectingChild->Die) << '\n';
645 !(Die.getTag() == DW_TAG_subprogram &&
646 ParentRI.Die.getTag() == DW_TAG_subprogram);
653 dump(ParentRI.Die);
654 dump(Die, 2) << '\n';
659 for (DWARFDie Child : Die)
665 unsigned DWARFVerifier::verifyDebugInfoAttribute(const DWARFDie &Die,
672 dump(Die) << '\n';
677 DWARFUnit *U = Die.getDwarfUnit();
724 Die.getLocations(DW_AT_location)) {
747 if (auto ReferencedDie = Die.getAttributeValueAsReferencedDie(Attr)) {
748 auto DieTag = Die.getTag();
769 DWARFDie TypeDie = Die.getAttributeValueAsReferencedDie(DW_AT_type);
834 unsigned DWARFVerifier::verifyDebugInfoForm(const DWARFDie &Die,
838 auto DieCU = Die.getDwarfUnit();
860 Die.dump(OS, 0, DumpOpts);
861 dump(Die) << '\n';
867 .insert(Die.getOffset());
883 dump(Die) << '\n';
888 CrossUnitReferences[*RefVal].insert(Die.getOffset());
905 dump(Die) << '\n';
944 auto Die = CU->getUnitDIE();
948 auto StmtSectionOffset = toSectionOffset(Die.find(DW_AT_stmt_list));
959 dump(Die) << '\n';
976 << format("0x%08" PRIx64, Die.getOffset())
979 dump(Die) << '\n';
984 StmtListToDie[LineTableOffset] = Die;
990 auto Die = CU->getUnitDIE();
1012 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1030 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1054 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1071 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1194 auto Die = DCtx.getDIEForOffset(Offset);
1195 if (!Die) {
1215 if ((Tag != dwarf::DW_TAG_null) && (Die.getTag() != Tag)) {
1219 << dwarf::TagString(Die.getTag()) << " of DIE["
1823 static bool isVariableIndexable(const DWARFDie &Die, DWARFContext &DCtx) {
1825 Die.getLocations(DW_AT_location);
1830 DWARFUnit *U = Die.getDwarfUnit();
1849 const DWARFDie &Die, const DWARFDebugNames::NameIndex &NI) {
1851 // First check, if the Die should be indexed. The code follows the DWARF v5
1856 if (Die.find(DW_AT_declaration))
1866 auto IncludeLinkageName = Die.getTag() == DW_TAG_subprogram ||
1867 Die.getTag() == DW_TAG_inlined_subroutine;
1872 auto EntryNames = getNames(Die, IncludeStrippedTemplateNames,
1882 switch (Die.getTag()) {
1918 if (Die.findRecursively(
1929 if (isVariableIndexable(Die, DCtx))
1937 // Now we know that our Die should be present in the Index. Let's check if
1940 uint64_t DieUnitOffset = Die.getOffset() - Die.getDwarfUnit()->getOffset();
1949 NI.getUnitOffset(), Die.getOffset(), Die.getTag(), Name);
1998 for (const DWARFDebugInfoEntry &Die :
2001 DWARFDie(NonSkeletonUnitDie.getDwarfUnit(), &Die), *NI);
2004 for (const DWARFDebugInfoEntry &Die : CU->dies())
2005 NumErrors += verifyNameIndexCompleteness(DWARFDie(CU, &Die), *NI);
2224 raw_ostream &DWARFVerifier::dump(const DWARFDie &Die, unsigned indent) const {
2225 Die.dump(OS, indent, DumpOpts);