Home | History | Annotate | Download | only in AsmPrinter

Lines Matching full:dwarf

1 //===-- llvm/CodeGen/DwarfDebug.cpp - Dwarf Debug Framework ---------------===//
10 // This file contains support for writing dwarf debug info into asm files.
57 static cl::opt<bool> DwarfAccelTables("dwarf-accel-tables", cl::Hidden,
58 cl::desc("Output prototype dwarf accelerator tables."),
62 const char *DWARFGroupName = "DWARF Emission";
63 const char *DbgTimerName = "DWARF Debug Writer";
106 if (tag == dwarf::DW_TAG_pointer_type) {
239 // Add the various names to the Dwarf accelerator table names.
285 SPCU->addUInt(SPDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1);
291 if (SPTag == dwarf::DW_TAG_subroutine_type)
293 DIE *Arg = new DIE(dwarf::DW_TAG_formal_parameter);
297 SPCU->addUInt(Arg, dwarf::DW_AT_artificial, dwarf::DW_FORM_flag, 1);
301 SPDie = new DIE(dwarf::DW_TAG_subprogram);
302 SPCU->addDIEEntry(SPDie, dwarf::DW_AT_specification, dwarf::DW_FORM_ref4,
309 SPDie = new DIE(dwarf::DW_TAG_subprogram);
310 SPCU->addDIEEntry(SPDie, dwarf::DW_AT_abstract_origin,
311 dwarf::DW_FORM_ref4, AbsSPDIE);
315 SPCU->addLabel(SPDie, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
317 SPCU->addLabel(SPDie, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr,
321 SPCU->addAddress(SPDie, dwarf::DW_AT_frame_base, Location);
334 DIE *ScopeDIE = new DIE(dwarf::DW_TAG_lexical_block);
347 TheCU->addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_data4,
368 TheCU->addLabel(ScopeDIE, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, Start);
369 TheCU->addLabel(ScopeDIE, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr, End);
405 DIE *ScopeDIE = new DIE(dwarf::DW_TAG_inlined_subroutine);
406 TheCU->addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin,
407 dwarf::DW_FORM_ref4, OriginDIE);
413 TheCU->addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_data4,
424 TheCU->addLabel(ScopeDIE, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
426 TheCU->addLabel(ScopeDIE, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr,
447 TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_file, 0,
449 TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_line, 0, DL.getLineNumber());
558 DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
560 NewCU->addString(Die, dwarf::DW_AT_producer, DIUnit.getProducer());
561 NewCU->addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
563 NewCU->addString(Die, dwarf::DW_AT_name, FN);
566 NewCU->addUInt(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
570 NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
573 NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
576 NewCU->addString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
578 NewCU->addUInt(Die, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1);
582 NewCU->addString(Die, dwarf::DW_AT_APPLE_flags, Flags);
585 NewCU->addUInt(Die, dwarf::DW_AT_APPLE_major_runtime_vers,
586 dwarf::DW_FORM_data1, RVer);
693 /// beginModule - Emit all Dwarf sections that should come prior to the
735 /// endModule - Emit all Dwarf sections that should come after the content.
780 FirstCU->addUInt(ISP, dwarf::DW_AT_inline, 0, dwarf::DW_INL_inlined);
787 FirstCU->addUInt(ISP, dwarf::DW_AT_inline, 0, dwarf::DW_INL_inlined);
819 // Emit info into a dwarf accelerator table sections.
884 if (DV.getTag() != dwarf::DW_TAG_arg_variable)
991 if (DV.getTag() == dwarf::DW_TAG_arg_variable &&
1259 if (DV.Verify() && DV.getTag() == dwarf::DW_TAG_arg_variable &&
1435 TheCU->addUInt(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr,
1436 dwarf::DW_FORM_flag, 1);
1528 assert(Abbrev->getChildrenFlag() == dwarf::DW_CHILDREN_yes &&
1550 sizeof(int16_t) + // DWARF version number
1557 /// EmitSectionLabels - Emit initial Dwarf sections with a label at
1562 // Dwarf sections base addresses.
1599 dwarf::TagString(Abbrev->getTag()));
1612 Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr));
1615 case dwarf::DW_AT_abstract_origin: {
1622 case dwarf::DW_AT_ranges: {
1638 case dwarf::DW_AT_location: {
1645 case dwarf::DW_AT_accessibility: {
1648 Asm->OutStreamer.AddComment(dwarf::AccessibilityString(V->getValue()));
1661 if (Abbrev->getChildrenFlag() == dwarf::DW_CHILDREN_yes) {
1690 sizeof(int16_t) + // DWARF version number
1696 Asm->OutStreamer.AddComment("DWARF version number");
1697 Asm->EmitInt16(dwarf::DWARF_VERSION);
1750 Asm->EmitInt8(dwarf::DW_LNE_set_address);
1769 dwarf::DW_FORM_data4));
1798 dwarf::DW_FORM_data4));
1827 dwarf::DW_FORM_data4));
1856 dwarf::DW_FORM_data4));
1858 dwarf::DW_FORM_data2));
1860 dwarf::DW_FORM_data1));
1891 // Start the dwarf pubtypes section.
1902 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DWARF Version");
1903 Asm->EmitInt16(dwarf::DWARF_VERSION);
1941 // Start the dwarf str section.
1981 // Start the dwarf loc section.
2008 (BTy.getEncoding() == dwarf::DW_ATE_signed
2009 || BTy.getEncoding() == dwarf::DW_ATE_signed_char)) {
2011 Asm->EmitInt8(dwarf::DW_OP_consts);
2015 Asm->EmitInt8(dwarf::DW_OP_constu);
2031 Asm->EmitInt8(dwarf::DW_OP_deref);
2033 Asm->EmitInt8(dwarf::DW_OP_plus_uconst);
2050 Asm->EmitInt8(dwarf::DW_OP_plus_uconst);
2053 Asm->EmitInt8(dwarf::DW_OP_deref);
2059 // to represent them here in dwarf.
2068 // Start the dwarf aranges section.
2076 // Start the dwarf ranges section.
2095 // Start the dwarf macinfo section.
2103 /// 2. Dwarf version number
2134 Asm->OutStreamer.AddComment("Dwarf Version");
2135 Asm->EmitInt16(dwarf::DWARF_VERSION);