Lines Matching +full:fetch +full:- +full:depth

1 //===-- DWARFUnit.cpp -----------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
92 DWARFUnit *dwo_cu = dwo_symbol_file->GetDWOCompileUnitForHash(*m_dwo_id);
98 dwo_symbol_file->GetObjectFile()->GetFileSpec().GetPath(), *m_dwo_id,
100 return; // Can't fetch the compile unit from the dwo file.
105 if (!dwo_cu->LinkToSkeletonUnit(*this)) {
111 DWARFBaseDIE dwo_cu_die = dwo_cu->GetUnitDIEOnly();
113 // Can't fetch the compile unit DIE from the dwo file.
123 // otherwise. We do that because pre-DWARF v5 could use the DW_AT_GNU_*
128 dwo_cu->SetAddrBase(*m_addr_base);
130 dwo_cu->SetAddrBase(*m_gnu_addr_base);
133 dwo_cu->SetRangesBase(*m_gnu_ranges_base);
134 else if (dwo_symbol_file->GetDWARFContext()
137 dwo_cu->SetRangesBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
140 dwo_symbol_file->GetDWARFContext().getOrLoadLocListsData().GetByteSize() >
142 dwo_cu->SetLoclistsBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
144 dwo_cu->SetBaseAddress(GetBaseAddress());
192 m_cu->m_die_array_scoped_mutex.lock_shared();
198 m_cu->m_die_array_scoped_mutex.unlock_shared();
199 if (!m_clear_dies || m_cu->m_cancel_scopes)
202 llvm::sys::ScopedWriter lock_scoped(m_cu->m_die_array_scoped_mutex);
203 llvm::sys::ScopedWriter lock(m_cu->m_die_array_mutex);
204 if (m_cu->m_cancel_scopes)
206 m_cu->ClearDIEsRWLocked();
241 uint32_t depth = 0;
251 if (depth == 0) {
254 // The average bytes per DIE entry has been seen to be around 14-20 so
255 // lets pre-reserve half of that since we are now stripping the NULL
268 // With -fsplit-dwarf-inlining, clang will emit non-empty skeleton compile
289 die.SetParentIndex(m_die_array.size() - die_index_stack[depth - 1]);
293 m_die_array.size() - die_index_stack.back());
305 if (depth > 0)
306 --depth;
309 die_index_stack.back() = m_die_array.size() - 1;
314 ++depth;
319 if (depth == 0)
340 m_dwo->ExtractDIEsIfNeeded();
354 entry->getContribution(llvm::DW_SECT_STR_OFFSETS))
355 baseOffset = contribution->getOffset();
446 return GetLengthByteSize() + GetLength() - GetHeaderByteSize();
455 return m_abbrevs ? m_abbrevs->getOffset() : DW_INVALID_OFFSET;
476 // cannot be handled. Returning a default-constructed ListTableType allows
487 offset -= HeaderSize;
497 const auto *contribution = entry->getContribution(llvm::DW_SECT_LOCLISTS);
499 GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
505 offset += contribution->getOffset();
514 offset += loclists_base - header_size;
515 if (llvm::Error E = m_loclist_table_header->extract(
518 GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
541 if (const auto *contribution = entry->getContribution(
543 return DWARFDataExtractor(data, contribution->getOffset(),
544 contribution->getLength32());
555 entry->getContribution(llvm::DW_SECT_RNGLISTS))
556 return DWARFDataExtractor(data, contribution->getOffset(),
557 contribution->getLength32());
558 GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
560 entry->getSignature());
582 GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
602 if (std::optional<uint64_t> off = GetRnglistTable()->getOffsetEntry(
609 Index, GetRnglistTable()->getOffsetEntryCount(), m_ranges_base);
632 if (m_dwo && !m_dwo->m_cancel_scopes)
633 m_dwo->ClearDIEsRWLocked();
637 return m_dwarf.GetObjectFile()->GetByteOrder();
659 GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
692 if (auto name = unit->PeekDIEName(offset); !name.empty())
708 return cu->GetAddressByteSize();
720 dwo ? dwo->GetBaseSymbolFile().GetSkeletonUnit(this) : nullptr;
753 die->GetAttributeValueAsString(this, DW_AT_producer, nullptr));
758 llvm::StringRef(R"(swiftlang-([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?))"));
760 llvm::StringRef(R"(clang-([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?))"));
795 m_language_type = die->GetAttributeValueAsUnsigned(this, DW_AT_language, 0);
804 if (die->GetAttributeValueAsUnsigned(this, DW_AT_APPLE_optimized, 0) ==
816 return m_comp_dir->GetPathStyle();
848 // drive-letter not a hostname.
863 die->GetAttributeValueAsString(this, DW_AT_comp_dir, nullptr));
872 die->GetAttributeValueAsString(this, DW_AT_name, nullptr);
885 FileSpec(die->GetAttributeValueAsString(this, DW_AT_name, nullptr),
888 if (m_file_spec->IsRelative())
889 m_file_spec->MakeAbsolute(GetCompilationDirectory());
896 return &llvm::cast<SymbolFileDWARFDwo>(m_dwo->GetSymbolFileDWARF());
905 die->BuildFunctionAddressRangeTable(this, m_func_aranges_up.get());
908 const DWARFDebugInfoEntry *dwo_die = m_dwo->DIEPtr();
910 dwo_die->BuildFunctionAddressRangeTable(m_dwo.get(),
915 m_func_aranges_up->Sort(minimize);
972 abbr->getAbbreviationDeclarationSet(header.getAbbrOffset());
1039 auto range_list_or_error = GetRnglistTable()->findList(data, offset);
1043 return range_list_or_error->getAbsoluteRanges(
1067 return m_dwo->HasAny(tags);