Lines Matching refs:dwarf
45 static dwarf::Tag GetCompileUnitType(UnitKind Kind, DwarfDebug *DW) { in GetCompileUnitType()
53 return dwarf::DW_TAG_skeleton_unit; in GetCompileUnitType()
55 return dwarf::DW_TAG_compile_unit; in GetCompileUnitType()
68 void DwarfCompileUnit::addLabelAddress(DIE &Die, dwarf::Attribute Attribute, in addLabelAddress()
87 DD->getDwarfVersion() >= 5 ? dwarf::DW_FORM_addrx in addLabelAddress()
88 : dwarf::DW_FORM_GNU_addr_index, in addLabelAddress()
101 addBlock(Die, Attribute, dwarf::DW_FORM_exprloc, Loc); in addLabelAddress()
103 addAttribute(Die, Attribute, dwarf::DW_FORM_LLVM_addrx_offset, in addLabelAddress()
109 dwarf::Attribute Attribute, in addLocalLabelAddress()
115 addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIELabel(Label)); in addLocalLabelAddress()
117 addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIEInteger(0)); in addLocalLabelAddress()
161 addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE); in getOrCreateGlobalVariableDIE()
169 addString(*VariableDIE, dwarf::DW_AT_name, GV->getDisplayName()); in getOrCreateGlobalVariableDIE()
175 addFlag(*VariableDIE, dwarf::DW_AT_external); in getOrCreateGlobalVariableDIE()
182 addFlag(*VariableDIE, dwarf::DW_AT_declaration); in getOrCreateGlobalVariableDIE()
187 addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, in getOrCreateGlobalVariableDIE()
274 addUInt(*Loc, dwarf::DW_FORM_data1, in addLocationAttribute()
275 PointerSize == 4 ? dwarf::DW_OP_const4u in addLocationAttribute()
276 : dwarf::DW_OP_const8u); in addLocationAttribute()
280 PointerSize == 4 ? dwarf::DW_FORM_data4 in addLocationAttribute()
281 : dwarf::DW_FORM_data8, in addLocationAttribute()
284 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index); in addLocationAttribute()
285 addUInt(*Loc, dwarf::DW_FORM_udata, in addLocationAttribute()
289 addUInt(*Loc, dwarf::DW_FORM_data1, in addLocationAttribute()
290 DD->useGNUTLSOpcode() ? dwarf::DW_OP_GNU_push_tls_address in addLocationAttribute()
291 : dwarf::DW_OP_form_tls_address); in addLocationAttribute()
312 addUInt(*VariableDIE, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1, in addLocationAttribute()
316 addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize()); in addLocationAttribute()
340 DIE &NDie = createAndAddDIE(dwarf::DW_TAG_common_block, *ContextDIE, CB); in getOrCreateCommonBlock()
342 addString(NDie, dwarf::DW_AT_name, Name); in getOrCreateCommonBlock()
387 addSectionLabel(getUnitDie(), dwarf::DW_AT_stmt_list, LineTableStartSym, in initStmtList()
393 addSectionLabel(D, dwarf::DW_AT_stmt_list, LineTableStartSym, in applyStmtList()
404 addLabelAddress(D, dwarf::DW_AT_low_pc, Begin); in attachLowHighPC()
406 addLabelAddress(D, dwarf::DW_AT_high_pc, End); in attachLowHighPC()
408 addLabelDelta(D, dwarf::DW_AT_high_pc, End, Begin); in attachLowHighPC()
428 addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr); in updateSubprogramScopeDIE()
439 addAddress(*SPDie, dwarf::DW_AT_frame_base, Location); in updateSubprogramScopeDIE()
445 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_call_frame_cfa); in updateSubprogramScopeDIE()
446 addBlock(*SPDie, dwarf::DW_AT_frame_base, Loc); in updateSubprogramScopeDIE()
469 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_WASM_location); in updateSubprogramScopeDIE()
470 addSInt(*Loc, dwarf::DW_FORM_sdata, TI_GLOBAL_RELOC); in updateSubprogramScopeDIE()
472 addLabel(*Loc, dwarf::DW_FORM_data4, SPSym); in updateSubprogramScopeDIE()
479 addUInt(*Loc, dwarf::DW_FORM_data4, FrameBase.Location.WasmLoc.Index); in updateSubprogramScopeDIE()
481 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_stack_value); in updateSubprogramScopeDIE()
482 addBlock(*SPDie, dwarf::DW_AT_frame_base, Loc); in updateSubprogramScopeDIE()
490 addBlock(*SPDie, dwarf::DW_AT_frame_base, DwarfExpr.finalize()); in updateSubprogramScopeDIE()
578 addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_rnglistx, Index); in addScopeRangeList()
584 addSectionDelta(ScopeDIE, dwarf::DW_AT_ranges, List.Label, in addScopeRangeList()
587 addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges, List.Label, in addScopeRangeList()
652 auto ScopeDIE = DIE::get(DIEValueAllocator, dwarf::DW_TAG_inlined_subroutine); in constructInlinedScopeDIE()
653 addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE); in constructInlinedScopeDIE()
659 addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None, in constructInlinedScopeDIE()
661 addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, IA->getLine()); in constructInlinedScopeDIE()
663 addUInt(*ScopeDIE, dwarf::DW_AT_call_column, None, IA->getColumn()); in constructInlinedScopeDIE()
665 addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator, None, in constructInlinedScopeDIE()
681 auto ScopeDIE = DIE::get(DIEValueAllocator, dwarf::DW_TAG_lexical_block); in constructLexicalScopeDIE()
724 addLocationList(*VariableDie, dwarf::DW_AT_location, Index); in constructVariableDIEImpl()
727 addUInt(*VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1, in constructVariableDIEImpl()
747 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); in constructVariableDIEImpl()
749 addUInt(*VariableDie, dwarf::DW_AT_LLVM_tag_offset, in constructVariableDIEImpl()
750 dwarf::DW_FORM_data1, *DwarfExpr.TagOffset); in constructVariableDIEImpl()
763 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); in constructVariableDIEImpl()
824 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); in constructVariableDIEImpl()
826 addUInt(*VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1, in constructVariableDIEImpl()
883 addUInt(*VariableDie, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1, in constructVariableDIEImpl()
886 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); in constructVariableDIEImpl()
888 addUInt(*VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1, in constructVariableDIEImpl()
907 if (!Array || Array->getTag() != dwarf::DW_TAG_array_type) in dependencies()
1053 addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer); in constructSubprogramScopeDIE()
1065 DIE::get(DIEValueAllocator, dwarf::DW_TAG_unspecified_parameters)); in constructSubprogramScopeDIE()
1113 AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr); in constructAbstractSubprogramScopeDIE()
1117 ContextCU->addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); in constructAbstractSubprogramScopeDIE()
1119 ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); in constructAbstractSubprogramScopeDIE()
1126 dwarf::Tag DwarfCompileUnit::getDwarf5OrGNUTag(dwarf::Tag Tag) const { in getDwarf5OrGNUTag()
1130 case dwarf::DW_TAG_call_site: in getDwarf5OrGNUTag()
1131 return dwarf::DW_TAG_GNU_call_site; in getDwarf5OrGNUTag()
1132 case dwarf::DW_TAG_call_site_parameter: in getDwarf5OrGNUTag()
1133 return dwarf::DW_TAG_GNU_call_site_parameter; in getDwarf5OrGNUTag()
1139 dwarf::Attribute
1140 DwarfCompileUnit::getDwarf5OrGNUAttr(dwarf::Attribute Attr) const { in getDwarf5OrGNUAttr()
1144 case dwarf::DW_AT_call_all_calls: in getDwarf5OrGNUAttr()
1145 return dwarf::DW_AT_GNU_all_call_sites; in getDwarf5OrGNUAttr()
1146 case dwarf::DW_AT_call_target: in getDwarf5OrGNUAttr()
1147 return dwarf::DW_AT_GNU_call_site_target; in getDwarf5OrGNUAttr()
1148 case dwarf::DW_AT_call_origin: in getDwarf5OrGNUAttr()
1149 return dwarf::DW_AT_abstract_origin; in getDwarf5OrGNUAttr()
1150 case dwarf::DW_AT_call_return_pc: in getDwarf5OrGNUAttr()
1151 return dwarf::DW_AT_low_pc; in getDwarf5OrGNUAttr()
1152 case dwarf::DW_AT_call_value: in getDwarf5OrGNUAttr()
1153 return dwarf::DW_AT_GNU_call_site_value; in getDwarf5OrGNUAttr()
1154 case dwarf::DW_AT_call_tail_call: in getDwarf5OrGNUAttr()
1155 return dwarf::DW_AT_GNU_tail_call; in getDwarf5OrGNUAttr()
1161 dwarf::LocationAtom
1162 DwarfCompileUnit::getDwarf5OrGNULocationAtom(dwarf::LocationAtom Loc) const { in getDwarf5OrGNULocationAtom()
1166 case dwarf::DW_OP_entry_value: in getDwarf5OrGNULocationAtom()
1167 return dwarf::DW_OP_GNU_entry_value; in getDwarf5OrGNULocationAtom()
1180 DIE &CallSiteDIE = createAndAddDIE(getDwarf5OrGNUTag(dwarf::DW_TAG_call_site), in constructCallSiteEntryDIE()
1185 addAddress(CallSiteDIE, getDwarf5OrGNUAttr(dwarf::DW_AT_call_target), in constructCallSiteEntryDIE()
1190 addDIEEntry(CallSiteDIE, getDwarf5OrGNUAttr(dwarf::DW_AT_call_origin), in constructCallSiteEntryDIE()
1196 addFlag(CallSiteDIE, getDwarf5OrGNUAttr(dwarf::DW_AT_call_tail_call)); in constructCallSiteEntryDIE()
1211 addLabelAddress(CallSiteDIE, dwarf::DW_AT_call_pc, CallAddr); in constructCallSiteEntryDIE()
1223 getDwarf5OrGNUAttr(dwarf::DW_AT_call_return_pc), PCAddr); in constructCallSiteEntryDIE()
1235 getDwarf5OrGNUTag(dwarf::DW_TAG_call_site_parameter)); in constructCallSiteParmEntryDIEs()
1237 addAddress(*CallSiteDieParam, dwarf::DW_AT_location, in constructCallSiteParmEntryDIEs()
1246 addBlock(*CallSiteDieParam, getDwarf5OrGNUAttr(dwarf::DW_AT_call_value), in constructCallSiteParmEntryDIEs()
1255 DIE *IMDie = DIE::get(DIEValueAllocator, (dwarf::Tag)Module->getTag()); in constructImportedEntityDIE()
1273 addDIEEntry(*IMDie, dwarf::DW_AT_import, *EntityDie); in constructImportedEntityDIE()
1276 addString(*IMDie, dwarf::DW_AT_name, Name); in constructImportedEntityDIE()
1286 addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE); in finishSubprogramDefinition()
1303 addDIEEntry(*Die, dwarf::DW_AT_abstract_origin, *AbsEntity->getDIE()); in finishEntityDefinition()
1316 addLabelAddress(*Die, dwarf::DW_AT_low_pc, Sym); in finishEntityDefinition()
1349 dwarf::UnitType UT = Skeleton ? dwarf::DW_UT_split_compile in emitHeader()
1350 : DD->useSplitDwarf() ? dwarf::DW_UT_skeleton in emitHeader()
1351 : dwarf::DW_UT_compile; in emitHeader()
1353 if (DD->getDwarfVersion() >= 5 && UT != dwarf::DW_UT_compile) in emitHeader()
1419 addComplexAddress(DV, Die, dwarf::DW_AT_location, Location); in addVariableAddress()
1421 addAddress(Die, dwarf::DW_AT_location, Location); in addVariableAddress()
1425 void DwarfCompileUnit::addAddress(DIE &Die, dwarf::Attribute Attribute, in addAddress()
1442 addUInt(Die, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1, in addAddress()
1451 dwarf::Attribute Attribute, in addComplexAddress()
1473 addUInt(Die, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1, in addComplexAddress()
1478 void DwarfCompileUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute, in addLocationList()
1480 dwarf::Form Form = (DD->getDwarfVersion() >= 5) in addLocationList()
1481 ? dwarf::DW_FORM_loclistx in addLocationList()
1490 addString(VariableDie, dwarf::DW_AT_name, Name); in applyVariableAttributes()
1494 addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, in applyVariableAttributes()
1500 addFlag(VariableDie, dwarf::DW_AT_artificial); in applyVariableAttributes()
1507 addString(LabelDie, dwarf::DW_AT_name, Name); in applyLabelAttributes()
1513 void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form, in addExpr()
1515 addAttribute(Die, (dwarf::Attribute)0, Form, DIEExpr(Expr)); in addExpr()
1543 DD->getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base in addAddrTableBase()
1544 : dwarf::DW_AT_GNU_addr_base, in addAddrTableBase()
1549 addAttribute(Die, (dwarf::Attribute)0, dwarf::DW_FORM_udata, in addBaseTypeRef()
1560 DIE::get(DIEValueAllocator, dwarf::DW_TAG_base_type)); in createBaseTypeDIEs()
1562 addString(Die, dwarf::DW_AT_name, in createBaseTypeDIEs()
1563 Twine(dwarf::AttributeEncodingString(Btr.Encoding) + in createBaseTypeDIEs()
1565 addUInt(Die, dwarf::DW_AT_encoding, dwarf::DW_FORM_data1, Btr.Encoding); in createBaseTypeDIEs()
1566 addUInt(Die, dwarf::DW_AT_byte_size, None, Btr.BitSize / 8); in createBaseTypeDIEs()