Lines Matching defs:Die
219 bool DWARFVerifier::verifyName(const DWARFDie &Die) {
226 Die.getFullName(OS, &OriginalFullName);
238 dump(Die) << '\n';
239 dump(Die.getDwarfUnit()->getUnitDIE()) << '\n';
250 auto Die = Unit.getDIEAtIndex(I);
252 if (Die.getTag() == DW_TAG_null)
255 for (auto AttrValue : Die.attributes()) {
256 NumUnitErrors += verifyDebugInfoAttribute(Die, AttrValue);
257 NumUnitErrors += verifyDebugInfoForm(Die, AttrValue, UnitLocalReferences,
261 NumUnitErrors += verifyName(Die);
263 if (Die.hasChildren()) {
264 if (Die.getFirstChild().isValid() &&
265 Die.getFirstChild().getTag() == DW_TAG_null) {
266 warn() << dwarf::TagString(Die.getTag())
268 Die.dump(OS);
272 NumUnitErrors += verifyDebugInfoCallSite(Die);
275 DWARFDie Die = Unit.getUnitDIE(/* ExtractUnitDIEOnly = */ false);
276 if (!Die) {
284 if (!dwarf::isUnitType(Die.getTag())) {
287 << dwarf::TagString(Die.getTag()) << ".\n";
293 if (!DWARFUnit::isMatchingUnitTypeAndTag(UnitType, Die.getTag())) {
296 << ") and root DIE (" << dwarf::TagString(Die.getTag())
305 if (Die.getTag() == dwarf::DW_TAG_skeleton_unit && Die.hasChildren()) {
313 NumUnitErrors += verifyDieRanges(Die, RI);
318 unsigned DWARFVerifier::verifyDebugInfoCallSite(const DWARFDie &Die) {
319 if (Die.getTag() != DW_TAG_call_site && Die.getTag() != DW_TAG_GNU_call_site)
322 DWARFDie Curr = Die.getParent();
323 for (; Curr.isValid() && !Curr.isSubprogramDIE(); Curr = Die.getParent()) {
338 Die.dump(OS);
353 Die.dump(OS, /*indent*/ 1);
550 unsigned DWARFVerifier::verifyDieRanges(const DWARFDie &Die,
554 if (!Die.isValid())
557 DWARFUnit *Unit = Die.getDwarfUnit();
559 auto RangesOrError = Die.getAddressRanges();
571 DieRangeInfo RI(Die);
579 // In such a case, when the Die is the CU, the ranges will overlap, and we
592 if (!IsObjectFile || IsMachOObject || Die.getTag() != DW_TAG_compile_unit) {
620 dump(Die, 2) << '\n';
629 dump(Die);
630 dump(IntersectingChild->Die) << '\n';
636 !(Die.getTag() == DW_TAG_subprogram &&
637 ParentRI.Die.getTag() == DW_TAG_subprogram);
644 dump(ParentRI.Die);
645 dump(Die, 2) << '\n';
650 for (DWARFDie Child : Die)
656 unsigned DWARFVerifier::verifyDebugInfoAttribute(const DWARFDie &Die,
663 dump(Die) << '\n';
668 DWARFUnit *U = Die.getDwarfUnit();
715 Die.getLocations(DW_AT_location)) {
738 if (auto ReferencedDie = Die.getAttributeValueAsReferencedDie(Attr)) {
739 auto DieTag = Die.getTag();
760 DWARFDie TypeDie = Die.getAttributeValueAsReferencedDie(DW_AT_type);
825 unsigned DWARFVerifier::verifyDebugInfoForm(const DWARFDie &Die,
829 auto DieCU = Die.getDwarfUnit();
851 Die.dump(OS, 0, DumpOpts);
852 dump(Die) << '\n';
858 .insert(Die.getOffset());
874 dump(Die) << '\n';
879 CrossUnitReferences[*RefVal].insert(Die.getOffset());
896 dump(Die) << '\n';
935 auto Die = CU->getUnitDIE();
939 auto StmtSectionOffset = toSectionOffset(Die.find(DW_AT_stmt_list));
950 dump(Die) << '\n';
967 << format("0x%08" PRIx64, Die.getOffset())
970 dump(Die) << '\n';
975 StmtListToDie[LineTableOffset] = Die;
981 auto Die = CU->getUnitDIE();
1003 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1023 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1047 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1064 *toSectionOffset(Die.find(DW_AT_stmt_list)))
1187 auto Die = DCtx.getDIEForOffset(Offset);
1188 if (!Die) {
1208 if ((Tag != dwarf::DW_TAG_null) && (Die.getTag() != Tag)) {
1212 << dwarf::TagString(Die.getTag()) << " of DIE["
1682 static bool isVariableIndexable(const DWARFDie &Die, DWARFContext &DCtx) {
1684 Die.getLocations(DW_AT_location);
1689 DWARFUnit *U = Die.getDwarfUnit();
1708 const DWARFDie &Die, const DWARFDebugNames::NameIndex &NI) {
1710 // First check, if the Die should be indexed. The code follows the DWARF v5
1715 if (Die.find(DW_AT_declaration))
1725 auto IncludeLinkageName = Die.getTag() == DW_TAG_subprogram ||
1726 Die.getTag() == DW_TAG_inlined_subroutine;
1731 auto EntryNames = getNames(Die, IncludeStrippedTemplateNames,
1741 switch (Die.getTag()) {
1777 if (Die.findRecursively(
1788 if (isVariableIndexable(Die, DCtx))
1796 // Now we know that our Die should be present in the Index. Let's check if
1799 uint64_t DieUnitOffset = Die.getOffset() - Die.getDwarfUnit()->getOffset();
1808 NI.getUnitOffset(), Die.getOffset(), Die.getTag(), Name);
1854 for (const DWARFDebugInfoEntry &Die : CU->dies())
1855 NumErrors += verifyNameIndexCompleteness(DWARFDie(CU, &Die), *NI);
2072 raw_ostream &DWARFVerifier::dump(const DWARFDie &Die, unsigned indent) const {
2073 Die.dump(OS, indent, DumpOpts);