Lines Matching +full:- +full:- +full:require +full:- +full:hashes
1 //===- DWARFVerifier.cpp --------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
63 if (Pos->merge(R))
67 auto Iter = Pos - 1;
69 if (Iter->merge(R))
85 if (Iter->intersects(RI))
101 bool Covered = I1->LowPC <= R.LowPC;
102 if (R.LowPC == R.HighPC || (Covered && R.HighPC <= I1->HighPC)) {
110 if (R.LowPC < I1->HighPC)
111 R.LowPC = I1->HighPC;
121 if (I1->intersects(*I2)) {
126 if (I1->LowPC < I2->LowPC)
166 DCtx.getDebugAbbrev()->getAbbreviationDeclarationSet(AbbrOffset);
184 error() << format("Units[%d] - start offset: 0x%08" PRIx64 " \n",
248 dump(Die.getDwarfUnit()->getUnitDIE()) << '\n';
375 Abbrev->getAbbreviationDeclarationSet(0);
423 if (const char* Name = Unit->getUnitDIE(true).getShortName())
436 CrossUnitReferences, [&](uint64_t Offset) -> DWARFUnit * {
520 M.insert(SC.getOffset(), SC.getOffset() + SC.getLength() - 1, Sig);
551 OS << "Verifying non-dwo Units...\n";
571 if (!Unit->isDWOUnit())
584 // Some object file formats (i.e. non-MachO) support COMDAT. ELF in
618 // address: 0 or -1.
639 dump(IntersectingChild->Die) << '\n';
683 unsigned DwarfVersion = U->getVersion();
687 if (U->isDWOUnit() && RangeSection.Data.empty())
703 if (*SectionOffset >= U->getLineSection().Data.size())
714 // without trying to resolve the address ranges - it'd be a more efficient
721 // needed (& then the existing API used here could be built on top of that -
727 DWARFExpression Expression(Data, U->getAddressByteSize(),
728 U->getFormParams().Format);
739 return U->isDWOUnit() ? Error::success()
780 if (U->isDWOUnit() && !U->isTypeUnit())
782 const auto *LT = U->getContext().getLineTableForUnit(U);
784 if (!LT->hasFileAtIndex(*FileIdx)) {
785 bool IsZeroIndexed = LT->Prologue.getVersion() >= 5;
787 LT->getLastValidFileIndex()) {
793 (IsZeroIndexed ? "0-" : "1-") +
851 auto CUSize = DieCU->getNextUnitOffset() - DieCU->getOffset();
866 LocalReferences[AttrValue.Value.getUnit()->getOffset() + *RefVal]
878 if (*RefVal >= DieCU->getInfoSection().Data.size()) {
921 return U->getDIEForOffset(Offset);
944 auto Die = CU->getUnitDIE();
975 << format("0x%08" PRIx64, Iter->second.getOffset()) << " and "
978 dump(Iter->second);
990 auto Die = CU->getUnitDIE();
998 bool isDWARF5 = LineTable->Prologue.getVersion() >= 5;
999 uint32_t MaxDirIndex = LineTable->Prologue.IncludeDirectories.size();
1003 for (const auto &FileName : LineTable->Prologue.FileNames) {
1008 "Invalid index in .debug_line->prologue.file_names->dir_idx",
1021 const bool HasFullPath = LineTable->getFileNameByIndex(
1022 FileIndex, CU->getCompilationDir(),
1027 if (!Inserted && It->second != FileIndex && DumpOpts.Verbose) {
1032 << "] is a duplicate of file_names[" << It->second << "]\n";
1040 if (LineTable->Rows.size() == 1 && LineTable->Rows.front().EndSequence)
1046 for (const auto &Row : LineTable->Rows) {
1060 LineTable->Rows[RowIndex - 1].dump(OS);
1066 if (!LineTable->hasFileAtIndex(Row.File)) {
1074 << LineTable->Prologue.FileNames.size()
1094 ErrorCategory.ShowDetail(this->DumpOpts.Verbose ||
1095 !this->DumpOpts.ShowAggregateErrors);
1097 IsObjectFile = F->isRelocatableObject();
1098 IsMachOObject = F->isMachO();
1199 const char *Name = StrData->getCStr(&StringOffset);
1240 CUMap[CU->getOffset()] = NotIndexed;
1257 ErrorCategory.Report("Name Index references non-existing CU", [&]() {
1259 "Name Index @ {0:x} references a non-existing CU @ {1:x}\n",
1266 if (Iter->second != NotIndexed) {
1271 NI.getUnitOffset(), Offset, Iter->second);
1275 Iter->second = NI.getUnitOffset();
1339 // Loop invariant: NextUncovered is the (1-based) index of the first Name
1354 NI.getUnitOffset(), NextUncovered, B.Index - 1);
1360 // The rest of the checks apply only to non-sentinel entries.
1364 // This triggers if a non-empty bucket points to a name with a mismatched
1381 // This find the end of this bucket and also verifies that all the hashes in
1382 // this bucket are correct by comparing the stored hashes to the ones we
1395 "hashes to {3:x}, but "
1477 if (!DWARFFormValue(AttrEnc.Form).isFormClass(Iter->Class)) {
1482 AttrEnc.Form, Iter->ClassName);
1550 Result.push_back(StrippedName->str());
1556 Result.emplace_back(ObjCNames->ClassName);
1557 Result.emplace_back(ObjCNames->Selector);
1558 if (ObjCNames->ClassNameNoCategory)
1559 Result.emplace_back(*ObjCNames->ClassNameNoCategory);
1560 if (ObjCNames->MethodNameNoCategory)
1561 Result.push_back(std::move(*ObjCNames->MethodNameNoCategory));
1597 std::optional<uint64_t> CUIndex = EntryOr->getRelatedCUIndex();
1598 std::optional<uint64_t> TUIndex = EntryOr->getTUIndex();
1663 if (DU == nullptr || DU->getOffset() != *UnitOffset) {
1686 DWARFDie UnitDie = DU->getUnitDIE();
1687 DWARFDie NonSkeletonUnitDie = DU->getNonSkeletonUnitDIE();
1688 if (DU->getDWOId() && UnitDie == NonSkeletonUnitDie) {
1709 const uint32_t ForeignTUIdx = *TUIndex - NumLocalTUs;
1712 NonSkeletonUnitDie.getDwarfUnit()->getContext();
1717 NonSkeletonUnitDie = NonSkeletonUnit->getUnitDIE(true);
1733 NonSkeletonUnit->getOffset() + *EntryOr->getDIEUnitOffset();
1734 const uint64_t NextUnitOffset = NonSkeletonUnit->getNextUnitOffset();
1746 DWARFDie DIE = NonSkeletonUnit->getDIEForOffset(DIEOffset);
1751 "non-existing DIE @ {2:x}.\n",
1762 DIE.getDwarfUnit()->getOffset() != *UnitOffset) {
1766 "DIE @ {2:x}: index - {3:x}; debug_info - {4:x}.\n",
1768 DIE.getDwarfUnit()->getOffset());
1772 if (DIE.getTag() != EntryOr->tag()) {
1776 "DIE @ {2:x}: index - {3}; debug_info - {4}.\n",
1777 NI.getUnitOffset(), EntryID, DIEOffset, EntryOr->tag(),
1792 "of DIE @ {2:x}: index - {3}; debug_info - {4}.\n",
1833 U->getAddressByteSize());
1834 DWARFExpression Expression(Data, U->getAddressByteSize(),
1835 U->getFormParams().Format);
1854 // "All non-defining declarations (that is, debugging information entries
1869 // the table, but we don't *require* them to pass the completeness test.
1940 uint64_t DieUnitOffset = Die.getOffset() - Die.getDwarfUnit()->getOffset();
1990 AccelTable.getCUOrTUNameIndex(U->getOffset())) {
1993 if (CU->getDWOId()) {
1994 DWARFDie CUDie = CU->getUnitDIE(true);
1996 CUDie.getDwarfUnit()->getNonSkeletonUnitDIE(false);
1999 NonSkeletonUnitDie.getDwarfUnit()->dies())
2004 for (const DWARFDebugInfoEntry &Die : CU->dies())
2095 SectionName, StartOffset, C.tell() - StartOffset, Length,
2099 // Nothing more to do - no other contributions to try.
2118 uint64_t Remainder = (Length - 4) % OffsetByteSize;
2123 "- header (0x4)) % offset size {3:X} == {4:X} != 0)\n",
2146 if (StrData[StrOff - 1] == '\0')
2211 RootNode.try_emplace("error-categories", std::move(Categories));
2212 RootNode.try_emplace("error-count", ErrorCount);