Lines Matching defs:dwarf_cu
738 DWARFUnit *dwarf_cu = DebugInfo().GetUnitAtIndex(comp_unit->GetID());
739 if (dwarf_cu && dwarf_cu->GetLLDBCompUnit() == nullptr)
740 dwarf_cu->SetLLDBCompUnit(comp_unit);
743 return llvm::cast_or_null<DWARFCompileUnit>(dwarf_cu);
748 static void MakeAbsoluteAndRemap(FileSpec &file_spec, DWARFUnit &dwarf_cu,
755 file_spec.MakeAbsolute(dwarf_cu.GetCompilationDirectory());
762 static const char *GetDWOName(DWARFCompileUnit &dwarf_cu,
765 cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
768 cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_dwo_name, nullptr);
772 lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit &dwarf_cu) {
774 CompileUnit *comp_unit = dwarf_cu.GetLLDBCompUnit();
781 cu_sp = m_debug_map_symfile->GetCompileUnit(this, dwarf_cu);
782 dwarf_cu.SetLLDBCompUnit(cu_sp.get());
791 module_sp, &dwarf_cu, support_file_sp,
792 *GetDWARFUnitIndex(dwarf_cu.GetID()), cu_language,
795 dwarf_cu.SetLLDBCompUnit(cu_sp.get());
797 SetCompileUnitAtIndex(dwarf_cu.GetID(), cu_sp);
802 if (dwarf_cu.GetVersion() < 5)
809 const DWARFBaseDIE cu_die = dwarf_cu.GetUnitDIEOnly();
812 if (!GetDWOName(dwarf_cu, *cu_die.GetDIE()))
820 if (!ParseSupportFiles(dwarf_cu, module_sp, support_files))
832 dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly();
835 dwarf_cu.GetDWARFLanguageType());
837 FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle());
841 MakeAbsoluteAndRemap(cu_file_spec, dwarf_cu, module_sp);
888 if (auto *dwarf_cu = llvm::cast_or_null<DWARFCompileUnit>(
890 return ParseCompileUnit(*dwarf_cu);
978 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
979 if (dwarf_cu)
980 return GetLanguage(dwarf_cu->GetNonSkeletonUnit());
987 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
988 if (!dwarf_cu)
990 const DWARFBaseDIE cu_die = dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly();
1016 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1017 if (!dwarf_cu)
1021 dwarf_cu = &dwarf_cu->GetNonSkeletonUnit();
1022 for (DWARFDebugInfoEntry &entry : dwarf_cu->dies()) {
1026 DWARFDIE die(dwarf_cu, &entry);
1067 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1068 if (!dwarf_cu)
1071 if (!ParseSupportFiles(*dwarf_cu, comp_unit.GetModule(), support_files))
1077 bool SymbolFileDWARF::ParseSupportFiles(DWARFUnit &dwarf_cu,
1081 dw_offset_t offset = dwarf_cu.GetLineTableOffset();
1088 dwarf_cu.GetOffset()))
1091 std::string comp_dir = dwarf_cu.GetCompilationDirectory().GetPath();
1093 dwarf_cu.GetPathStyle(), comp_dir);
1098 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit)) {
1099 if (CompileUnit *lldb_cu = GetCompUnitForDWARFCompUnit(*dwarf_cu))
1150 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1151 if (dwarf_cu)
1152 return dwarf_cu->GetNonSkeletonUnit().GetIsOptimized();
1161 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
1162 if (!dwarf_cu)
1169 const DWARFDIE die = dwarf_cu->DIE();
1197 FileSpec include_spec(include_path, dwarf_cu->GetPathStyle());
1198 MakeAbsoluteAndRemap(include_spec, *dwarf_cu,
1202 if (const char *sysroot = dwarf_cu->DIE().GetAttributeValueAsString(
1216 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1217 if (!dwarf_cu)
1220 dw_offset_t offset = dwarf_cu->GetLineTableOffset();
1227 ParseLLVMLineTable(m_context, line, offset, dwarf_cu->GetOffset());
1299 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1300 if (dwarf_cu == nullptr)
1303 const DWARFBaseDIE dwarf_cu_die = dwarf_cu->GetUnitDIEOnly();
1643 SymbolFileDWARF::GetCompUnitForDWARFCompUnit(DWARFCompileUnit &dwarf_cu) {
1645 if (dwarf_cu.IsDWOUnit()) {
1646 DWARFCompileUnit *non_dwo_cu = dwarf_cu.GetSkeletonUnit();
1652 CompileUnit *lldb_cu = dwarf_cu.GetLLDBCompUnit();
1657 return ParseCompileUnit(dwarf_cu).get();
1743 static std::optional<uint64_t> GetDWOId(DWARFCompileUnit &dwarf_cu,
1746 cu_die.GetAttributeValueAsOptionalUnsigned(&dwarf_cu, DW_AT_GNU_dwo_id);
1749 return cu_die.GetAttributeValueAsOptionalUnsigned(&dwarf_cu, DW_AT_dwo_id);
1777 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit);
1780 if (!dwarf_cu || !dwarf_cu->GetDWOId().has_value())
1783 const char *dwo_name = GetDWOName(*dwarf_cu, cu_die);
1806 cu_die.GetAttributeValueAsString(dwarf_cu, DW_AT_comp_dir, nullptr);
1941 dwarf_cu->GetID());
1953 auto *dwarf_cu =
1955 if (!dwarf_cu)
1958 const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();
1971 const char *dwo_path = GetDWOName(*dwarf_cu, *die.GetDIE());
2025 std::optional<uint64_t> dwo_id = ::GetDWOId(*dwarf_cu, *die.GetDIE());
2165 if (auto *dwarf_cu = llvm::dyn_cast_or_null<DWARFCompileUnit>(
2168 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2348 auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2349 if (!dwarf_cu)
2351 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2417 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2418 if (!dwarf_cu)
2420 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2832 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU()))
2833 scope = GetCompUnitForDWARFCompUnit(*dwarf_cu);
3160 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(comp_unit);
3161 if (!dwarf_cu)
3167 dwarf_cu->GetNonSkeletonUnit().GetDIE(function_die_offset);
3183 "{1:x}: {0}", dwarf_cu->GetOffset());
3193 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
3194 if (dwarf_cu) {
3195 DWARFDIE dwarf_cu_die = dwarf_cu->DIE();
3231 DWARFUnit *dwarf_cu = DebugInfo().GetUnitAtIndex(sc.comp_unit->GetID());
3233 if (dwarf_cu == nullptr)
3243 m_index->GetGlobalVariables(*dwarf_cu, [&](DWARFDIE die) {
3299 const DWARFUnit *dwarf_cu = form_value.GetUnit();
3300 if (DWARFExpression::ParseDWARFLocationList(dwarf_cu, data, &location_list))
4151 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(unit);
4152 if (dwarf_cu == nullptr)
4157 if (!dwarf_cu->GetDWOId().has_value())
4162 const uint64_t dwo_id = dwarf_cu->GetDWOId().value();
4165 if (const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly()) {
4166 const char *dwo_name = GetDWOName(*dwarf_cu, *die.GetDIE());
4174 dwarf_cu, DW_AT_comp_dir, nullptr);
4182 dwarf_cu->GetOffset())
4188 SymbolFile *dwo_symfile = dwarf_cu->GetDwoSymbolFile();
4195 dwarf_cu->GetDwoError().AsCString("unknown"));
4369 DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(cu);
4370 if (!dwarf_cu)
4376 dwarf_cu->ExtractUnitDIEIfNeeded();
4377 const Status &dwo_error = dwarf_cu->GetDwoError();
4383 if (dwarf_cu->GetDWARFLanguageType() == DW_LANG_Mips_Assembler)
4388 if (dwarf_cu->HasAny({DW_TAG_variable, DW_TAG_formal_parameter}))
4406 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(comp_unit.get());
4407 if (!dwarf_cu)
4410 const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();