Lines Matching defs:dwarf_cu

732   DWARFUnit *dwarf_cu = DebugInfo().GetUnitAtIndex(comp_unit->GetID());
733 if (dwarf_cu && dwarf_cu->GetLLDBCompUnit() == nullptr)
734 dwarf_cu->SetLLDBCompUnit(comp_unit);
737 return llvm::cast_or_null<DWARFCompileUnit>(dwarf_cu);
755 static void MakeAbsoluteAndRemap(FileSpec &file_spec, DWARFUnit &dwarf_cu,
762 file_spec.MakeAbsolute(dwarf_cu.GetCompilationDirectory());
769 static const char *GetDWOName(DWARFCompileUnit &dwarf_cu,
772 cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
775 cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_dwo_name, nullptr);
779 lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit &dwarf_cu) {
781 CompileUnit *comp_unit = dwarf_cu.GetLLDBCompUnit();
788 cu_sp = m_debug_map_symfile->GetCompileUnit(this, dwarf_cu);
789 dwarf_cu.SetLLDBCompUnit(cu_sp.get());
798 module_sp, &dwarf_cu, support_file_sp,
799 *GetDWARFUnitIndex(dwarf_cu.GetID()), cu_language,
802 dwarf_cu.SetLLDBCompUnit(cu_sp.get());
804 SetCompileUnitAtIndex(dwarf_cu.GetID(), cu_sp);
809 if (dwarf_cu.GetVersion() < 5)
816 const DWARFBaseDIE cu_die = dwarf_cu.GetUnitDIEOnly();
819 if (!GetDWOName(dwarf_cu, *cu_die.GetDIE()))
827 if (!ParseSupportFiles(dwarf_cu, module_sp, support_files))
839 dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly();
842 dwarf_cu.GetDWARFLanguageType());
844 FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle());
848 MakeAbsoluteAndRemap(cu_file_spec, dwarf_cu, module_sp);
895 if (auto *dwarf_cu = llvm::cast_or_null<DWARFCompileUnit>(
897 return ParseCompileUnit(*dwarf_cu);
992 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
993 if (dwarf_cu)
994 return GetLanguage(dwarf_cu->GetNonSkeletonUnit());
1001 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1002 if (!dwarf_cu)
1004 const DWARFBaseDIE cu_die = dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly();
1030 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1031 if (!dwarf_cu)
1035 dwarf_cu = &dwarf_cu->GetNonSkeletonUnit();
1036 for (DWARFDebugInfoEntry &entry : dwarf_cu->dies()) {
1040 DWARFDIE die(dwarf_cu, &entry);
1081 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1082 if (!dwarf_cu)
1085 if (!ParseSupportFiles(*dwarf_cu, comp_unit.GetModule(), support_files))
1091 bool SymbolFileDWARF::ParseSupportFiles(DWARFUnit &dwarf_cu,
1095 dw_offset_t offset = dwarf_cu.GetLineTableOffset();
1102 dwarf_cu.GetOffset()))
1105 std::string comp_dir = dwarf_cu.GetCompilationDirectory().GetPath();
1107 dwarf_cu.GetPathStyle(), comp_dir);
1112 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit)) {
1113 if (CompileUnit *lldb_cu = GetCompUnitForDWARFCompUnit(*dwarf_cu))
1164 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1165 if (dwarf_cu)
1166 return dwarf_cu->GetNonSkeletonUnit().GetIsOptimized();
1175 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
1176 if (!dwarf_cu)
1183 const DWARFDIE die = dwarf_cu->DIE();
1211 FileSpec include_spec(include_path, dwarf_cu->GetPathStyle());
1212 MakeAbsoluteAndRemap(include_spec, *dwarf_cu,
1216 if (const char *sysroot = dwarf_cu->DIE().GetAttributeValueAsString(
1230 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1231 if (!dwarf_cu)
1234 dw_offset_t offset = dwarf_cu->GetLineTableOffset();
1241 ParseLLVMLineTable(m_context, line, offset, dwarf_cu->GetOffset());
1313 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
1314 if (dwarf_cu == nullptr)
1317 const DWARFBaseDIE dwarf_cu_die = dwarf_cu->GetUnitDIEOnly();
1704 SymbolFileDWARF::GetCompUnitForDWARFCompUnit(DWARFCompileUnit &dwarf_cu) {
1706 if (dwarf_cu.IsDWOUnit()) {
1707 DWARFCompileUnit *non_dwo_cu = dwarf_cu.GetSkeletonUnit();
1713 CompileUnit *lldb_cu = dwarf_cu.GetLLDBCompUnit();
1718 return ParseCompileUnit(dwarf_cu).get();
1804 static std::optional<uint64_t> GetDWOId(DWARFCompileUnit &dwarf_cu,
1807 cu_die.GetAttributeValueAsOptionalUnsigned(&dwarf_cu, DW_AT_GNU_dwo_id);
1810 return cu_die.GetAttributeValueAsOptionalUnsigned(&dwarf_cu, DW_AT_dwo_id);
1838 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit);
1841 if (!dwarf_cu || !dwarf_cu->GetDWOId().has_value())
1844 const char *dwo_name = GetDWOName(*dwarf_cu, cu_die);
1867 cu_die.GetAttributeValueAsString(dwarf_cu, DW_AT_comp_dir, nullptr);
2002 dwarf_cu->GetID());
2014 auto *dwarf_cu =
2016 if (!dwarf_cu)
2019 const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();
2032 const char *dwo_path = GetDWOName(*dwarf_cu, *die.GetDIE());
2084 std::optional<uint64_t> dwo_id = ::GetDWOId(*dwarf_cu, *die.GetDIE());
2225 if (auto *dwarf_cu = llvm::dyn_cast_or_null<DWARFCompileUnit>(
2228 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2408 auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2409 if (!dwarf_cu)
2411 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2477 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2478 if (!dwarf_cu)
2480 sc.comp_unit = GetCompUnitForDWARFCompUnit(*dwarf_cu);
2907 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU()))
2908 scope = GetCompUnitForDWARFCompUnit(*dwarf_cu);
3014 DWARFUnit *dwarf_cu = debug_info.GetUnitAtIndex(cu_idx);
3015 if (dwarf_cu != cu &&
3016 dwarf_cu->Supports_DW_AT_APPLE_objc_complete_type()) {
3267 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(comp_unit);
3268 if (!dwarf_cu)
3274 dwarf_cu->GetNonSkeletonUnit().GetDIE(function_die_offset);
3286 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
3287 if (dwarf_cu) {
3288 DWARFDIE dwarf_cu_die = dwarf_cu->DIE();
3319 DWARFUnit *dwarf_cu = DebugInfo().GetUnitAtIndex(sc.comp_unit->GetID());
3321 if (dwarf_cu == nullptr)
3331 m_index->GetGlobalVariables(*dwarf_cu, [&](DWARFDIE die) {
3387 const DWARFUnit *dwarf_cu = form_value.GetUnit();
3388 if (DWARFExpression::ParseDWARFLocationList(dwarf_cu, data, &location_list))
4234 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(unit);
4235 if (dwarf_cu == nullptr)
4240 if (!dwarf_cu->GetDWOId().has_value())
4245 const uint64_t dwo_id = dwarf_cu->GetDWOId().value();
4248 if (const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly()) {
4249 const char *dwo_name = GetDWOName(*dwarf_cu, *die.GetDIE());
4257 dwarf_cu, DW_AT_comp_dir, nullptr);
4265 dwarf_cu->GetOffset())
4271 SymbolFile *dwo_symfile = dwarf_cu->GetDwoSymbolFile();
4278 dwarf_cu->GetDwoError().AsCString("unknown"));
4434 DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(cu);
4435 if (!dwarf_cu)
4441 dwarf_cu->ExtractUnitDIEIfNeeded();
4442 const Status &dwo_error = dwarf_cu->GetDwoError();
4448 if (dwarf_cu->GetDWARFLanguageType() == DW_LANG_Mips_Assembler)
4453 if (dwarf_cu->HasAny({DW_TAG_variable, DW_TAG_formal_parameter}))
4470 DWARFUnit *dwarf_cu = GetDWARFCompileUnit(comp_unit.get());
4471 if (!dwarf_cu)
4474 const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();