diff --git a/lldb/test/API/functionalities/source-map/a.yaml b/lldb/test/API/functionalities/source-map/a.yaml --- a/lldb/test/API/functionalities/source-map/a.yaml +++ b/lldb/test/API/functionalities/source-map/a.yaml @@ -218,88 +218,90 @@ - argc - argv - char - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000006 - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000006 + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_info: - - Length: 122 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 122 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/lldb/unittests/Expression/DWARFExpressionTest.cpp b/lldb/unittests/Expression/DWARFExpressionTest.cpp --- a/lldb/unittests/Expression/DWARFExpressionTest.cpp +++ b/lldb/unittests/Expression/DWARFExpressionTest.cpp @@ -79,25 +79,27 @@ /// Auxiliary debug info. const char *yamldata = "debug_abbrev:\n" - " - Code: 0x00000001\n" - " Tag: DW_TAG_compile_unit\n" - " Children: DW_CHILDREN_yes\n" - " Attributes:\n" - " - Attribute: DW_AT_language\n" - " Form: DW_FORM_data2\n" - " - Code: 0x00000002\n" - " Tag: DW_TAG_base_type\n" - " Children: DW_CHILDREN_no\n" - " Attributes:\n" - " - Attribute: DW_AT_encoding\n" - " Form: DW_FORM_data1\n" - " - Attribute: DW_AT_byte_size\n" - " Form: DW_FORM_data1\n" + " - Table:\n" + " - Code: 0x00000001\n" + " Tag: DW_TAG_compile_unit\n" + " Children: DW_CHILDREN_yes\n" + " Attributes:\n" + " - Attribute: DW_AT_language\n" + " Form: DW_FORM_data2\n" + " - Code: 0x00000002\n" + " Tag: DW_TAG_base_type\n" + " Children: DW_CHILDREN_no\n" + " Attributes:\n" + " - Attribute: DW_AT_encoding\n" + " Form: DW_FORM_data1\n" + " - Attribute: DW_AT_byte_size\n" + " Form: DW_FORM_data1\n" "debug_info:\n" - " - Length: 0\n" - " Version: 4\n" - " AbbrOffset: 0\n" - " AddrSize: 8\n" + " - Length: 0\n" + " Version: 4\n" + " AbbrevTableIndex: 1\n" + " AbbrOffset: 0\n" + " AddrSize: 8\n" " Entries:\n" " - AbbrCode: 0x00000001\n" " Values:\n" diff --git a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml --- a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml +++ b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml @@ -164,188 +164,190 @@ - argv - char - sum - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_linkage_name - Form: DW_FORM_strp - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000005 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_linkage_name - Form: DW_FORM_strp - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Attribute: DW_AT_inline - Form: DW_FORM_data1 - - Code: 0x00000006 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000007 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000008 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000009 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x0000000A - Tag: DW_TAG_inlined_subroutine - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref4 - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_call_file - Form: DW_FORM_data1 - - Attribute: DW_AT_call_line - Form: DW_FORM_data1 - - Code: 0x0000000B - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref4 - - Code: 0x0000000C - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref4 - - Code: 0x0000000D - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_linkage_name + Form: DW_FORM_strp + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000005 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_linkage_name + Form: DW_FORM_strp + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Attribute: DW_AT_inline + Form: DW_FORM_data1 + - Code: 0x00000006 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000007 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000008 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000009 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x0000000A + Tag: DW_TAG_inlined_subroutine + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref4 + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_call_file + Form: DW_FORM_data1 + - Attribute: DW_AT_call_line + Form: DW_FORM_data1 + - Code: 0x0000000B + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref4 + - Code: 0x0000000C + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref4 + - Code: 0x0000000D + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_info: - - Length: 579 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 579 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp --- a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp +++ b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp @@ -41,25 +41,27 @@ /// Auxiliary debug info. const char *yamldata = "debug_abbrev:\n" - " - Code: 0x00000001\n" - " Tag: DW_TAG_compile_unit\n" - " Children: DW_CHILDREN_yes\n" - " Attributes:\n" - " - Attribute: DW_AT_language\n" - " Form: DW_FORM_data2\n" - " - Code: 0x00000002\n" - " Tag: DW_TAG_base_type\n" - " Children: DW_CHILDREN_no\n" - " Attributes:\n" - " - Attribute: DW_AT_encoding\n" - " Form: DW_FORM_data1\n" - " - Attribute: DW_AT_byte_size\n" - " Form: DW_FORM_data1\n" + " - Table:\n" + " - Code: 0x00000001\n" + " Tag: DW_TAG_compile_unit\n" + " Children: DW_CHILDREN_yes\n" + " Attributes:\n" + " - Attribute: DW_AT_language\n" + " Form: DW_FORM_data2\n" + " - Code: 0x00000002\n" + " Tag: DW_TAG_base_type\n" + " Children: DW_CHILDREN_no\n" + " Attributes:\n" + " - Attribute: DW_AT_encoding\n" + " Form: DW_FORM_data1\n" + " - Attribute: DW_AT_byte_size\n" + " Form: DW_FORM_data1\n" "debug_info:\n" - " - Length: 0\n" - " Version: 4\n" - " AbbrOffset: 0\n" - " AddrSize: 8\n" + " - Length: 0\n" + " Version: 4\n" + " AbbrevTableIndex: 1\n" + " AbbrOffset: 0\n" + " AddrSize: 8\n" " Entries:\n" " - AbbrCode: 0x00000001\n" " Values:\n" diff --git a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp --- a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp +++ b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp @@ -38,19 +38,21 @@ debug_str: - MacOSX10.9.sdk debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_APPLE_sdk - Form: DW_FORM_strp + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_APPLE_sdk + Form: DW_FORM_strp debug_info: - - Length: 8 - Version: 2 - AbbrOffset: 0 - AddrSize: 8 + - Length: 8 + Version: 2 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h b/llvm/include/llvm/ObjectYAML/DWARFYAML.h --- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h +++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h @@ -58,6 +58,10 @@ std::vector Attributes; }; +struct AbbrevTable { + std::vector AbbrevDecls; +}; + struct ARangeDescriptor { llvm::yaml::Hex64 Address; uint64_t Length; @@ -121,6 +125,7 @@ uint64_t Length; uint16_t Version; llvm::dwarf::UnitType Type; // Added in DWARF 5 + uint64_t AbbrevTableIndex; yaml::Hex64 AbbrOffset; uint8_t AddrSize; std::vector Entries; @@ -178,7 +183,7 @@ struct Data { bool IsLittleEndian; bool Is64bit; - std::vector AbbrevDecls; + std::vector DebugAbbrev; std::vector DebugStrings; std::vector ARanges; std::vector DebugRanges; @@ -203,6 +208,7 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::AttributeAbbrev) LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::Abbrev) +LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::AbbrevTable) LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARangeDescriptor) LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARange) LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::RangeEntry) @@ -224,6 +230,10 @@ static void mapping(IO &IO, DWARFYAML::Data &DWARF); }; +template <> struct MappingTraits { + static void mapping(IO &IO, DWARFYAML::AbbrevTable &AbbrevTable); +}; + template <> struct MappingTraits { static void mapping(IO &IO, DWARFYAML::Abbrev &Abbrev); }; diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp --- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp +++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp @@ -95,25 +95,28 @@ } Error DWARFYAML::emitDebugAbbrev(raw_ostream &OS, const DWARFYAML::Data &DI) { - uint64_t AbbrevCode = 0; - for (auto AbbrevDecl : DI.AbbrevDecls) { - AbbrevCode = AbbrevDecl.Code ? (uint64_t)*AbbrevDecl.Code : AbbrevCode + 1; - encodeULEB128(AbbrevCode, OS); - encodeULEB128(AbbrevDecl.Tag, OS); - OS.write(AbbrevDecl.Children); - for (auto Attr : AbbrevDecl.Attributes) { - encodeULEB128(Attr.Attribute, OS); - encodeULEB128(Attr.Form, OS); - if (Attr.Form == dwarf::DW_FORM_implicit_const) - encodeSLEB128(Attr.Value, OS); + for (const DWARFYAML::AbbrevTable &AbbrevTable : DI.DebugAbbrev) { + uint64_t AbbrevCode = 0; + for (auto AbbrevDecl : AbbrevTable.AbbrevDecls) { + AbbrevCode = + AbbrevDecl.Code ? (uint64_t)*AbbrevDecl.Code : AbbrevCode + 1; + encodeULEB128(AbbrevCode, OS); + encodeULEB128(AbbrevDecl.Tag, OS); + OS.write(AbbrevDecl.Children); + for (auto Attr : AbbrevDecl.Attributes) { + encodeULEB128(Attr.Attribute, OS); + encodeULEB128(Attr.Form, OS); + if (Attr.Form == dwarf::DW_FORM_implicit_const) + encodeSLEB128(Attr.Value, OS); + } + encodeULEB128(0, OS); + encodeULEB128(0, OS); } - encodeULEB128(0, OS); - encodeULEB128(0, OS); - } - // The abbreviations for a given compilation unit end with an entry consisting - // of a 0 byte for the abbreviation code. - OS.write_zeros(1); + // The abbreviations for a given compilation unit end with an entry + // consisting of a 0 byte for the abbreviation code. + OS.write_zeros(1); + } return Error::success(); } diff --git a/llvm/lib/ObjectYAML/DWARFVisitor.cpp b/llvm/lib/ObjectYAML/DWARFVisitor.cpp --- a/llvm/lib/ObjectYAML/DWARFVisitor.cpp +++ b/llvm/lib/ObjectYAML/DWARFVisitor.cpp @@ -52,18 +52,30 @@ if (Unit.Entries.empty()) continue; + bool HasAssociatedAbbrevTable = + Unit.AbbrevTableIndex > 0 && + Unit.AbbrevTableIndex <= DebugInfo.DebugAbbrev.size(); + for (auto &Entry : Unit.Entries) { onStartDIE(Unit, Entry); uint32_t AbbrCode = Entry.AbbrCode; if (AbbrCode == 0 || Entry.Values.empty()) continue; - if (AbbrCode > DebugInfo.AbbrevDecls.size()) + if (!HasAssociatedAbbrevTable) + return createStringError(errc::invalid_argument, + "abbrev table index must be less than or " + "equal to the number of abbrev tables"); + + const DWARFYAML::AbbrevTable &AbbrevTable = + DebugInfo.DebugAbbrev[Unit.AbbrevTableIndex - 1]; + + if (AbbrCode > AbbrevTable.AbbrevDecls.size()) return createStringError( errc::invalid_argument, "abbrev code must be less than or equal to the number of " "entries in abbreviation table"); - const DWARFYAML::Abbrev &Abbrev = DebugInfo.AbbrevDecls[AbbrCode - 1]; + const DWARFYAML::Abbrev &Abbrev = AbbrevTable.AbbrevDecls[AbbrCode - 1]; auto FormVal = Entry.Values.begin(); auto AbbrForm = Abbrev.Attributes.begin(); for (; diff --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp --- a/llvm/lib/ObjectYAML/DWARFYAML.cpp +++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp @@ -13,11 +13,12 @@ #include "llvm/ObjectYAML/DWARFYAML.h" #include "llvm/BinaryFormat/Dwarf.h" +#include "llvm/Support/YAMLTraits.h" namespace llvm { bool DWARFYAML::Data::isEmpty() const { - return DebugStrings.empty() && AbbrevDecls.empty() && ARanges.empty() && + return DebugStrings.empty() && DebugAbbrev.empty() && ARanges.empty() && DebugRanges.empty() && !PubNames && !PubTypes && !GNUPubNames && !GNUPubTypes && CompileUnits.empty() && DebugLines.empty(); } @@ -34,7 +35,7 @@ SecNames.insert("debug_line"); if (!DebugAddr.empty()) SecNames.insert("debug_addr"); - if (!AbbrevDecls.empty()) + if (!DebugAbbrev.empty()) SecNames.insert("debug_abbrev"); if (!CompileUnits.empty()) SecNames.insert("debug_info"); @@ -49,7 +50,7 @@ void MappingTraits::mapping(IO &IO, DWARFYAML::Data &DWARF) { IO.mapOptional("debug_str", DWARF.DebugStrings); - IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls); + IO.mapOptional("debug_abbrev", DWARF.DebugAbbrev); if (!DWARF.ARanges.empty() || !IO.outputting()) IO.mapOptional("debug_aranges", DWARF.ARanges); if (!DWARF.DebugRanges.empty() || !IO.outputting()) @@ -63,6 +64,11 @@ IO.mapOptional("debug_addr", DWARF.DebugAddr); } +void MappingTraits::mapping( + IO &IO, DWARFYAML::AbbrevTable &AbbrevTable) { + IO.mapRequired("Table", AbbrevTable.AbbrevDecls); +} + void MappingTraits::mapping(IO &IO, DWARFYAML::Abbrev &Abbrev) { IO.mapOptional("Code", Abbrev.Code); @@ -119,7 +125,7 @@ void MappingTraits::mapping( IO &IO, DWARFYAML::PubSection &Section) { - auto OldContext = IO.getContext(); + auto *OldContext = IO.getContext(); IO.setContext(&Section); IO.mapRequired("Length", Section.Length); @@ -137,6 +143,7 @@ IO.mapRequired("Version", Unit.Version); if (Unit.Version >= 5) IO.mapRequired("UnitType", Unit.Type); + IO.mapRequired("AbbrevTableIndex", Unit.AbbrevTableIndex); IO.mapRequired("AbbrOffset", Unit.AbbrOffset); IO.mapRequired("AddrSize", Unit.AddrSize); IO.mapOptional("Entries", Unit.Entries); diff --git a/llvm/test/ObjectYAML/MachO/DWARF-BigEndian.yaml b/llvm/test/ObjectYAML/MachO/DWARF-BigEndian.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-BigEndian.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-BigEndian.yaml @@ -274,212 +274,212 @@ - a - N - t - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000003 - Tag: DW_TAG_typedef - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Code: 0x00000004 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000005 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000006 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000007 - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 -... - -#CHECK: DWARF: -#CHECK: debug_str: -#CHECK: - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)' -#CHECK: - '../compiler-rt/lib/builtins/absvdi2.c' -#CHECK: - '/Users/cbieneman/dev/open-source/llvm-build-rel' -#CHECK: - int -#CHECK: - di_int -#CHECK: - long long int -#CHECK: - __absvdi2 -#CHECK: - a -#CHECK: - N -#CHECK: - t -#CHECK: debug_abbrev: -#CHECK: - Code: 0x0000000000000001 -#CHECK: Tag: DW_TAG_compile_unit -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_producer -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_language -#CHECK: Form: DW_FORM_data2 -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_stmt_list -#CHECK: Form: DW_FORM_sec_offset -#CHECK: - Attribute: DW_AT_comp_dir -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Code: 0x0000000000000002 -#CHECK: Tag: DW_TAG_base_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_encoding -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_byte_size -#CHECK: Form: DW_FORM_data1 -#CHECK: - Code: 0x0000000000000003 -#CHECK: Tag: DW_TAG_typedef -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Code: 0x0000000000000004 -#CHECK: Tag: DW_TAG_subprogram -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Attribute: DW_AT_frame_base -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_prototyped -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Attribute: DW_AT_external -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Code: 0x0000000000000005 -#CHECK: Tag: DW_TAG_formal_parameter -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_location -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Code: 0x0000000000000006 -#CHECK: Tag: DW_TAG_variable -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_location -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Code: 0x0000000000000007 -#CHECK: Tag: DW_TAG_const_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000003 + Tag: DW_TAG_typedef + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Code: 0x00000004 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000005 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000006 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000007 + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 +# CHECK: DWARF: +# CHECK-NEXT: debug_str: +# CHECK-NEXT: - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)' +# CHECK-NEXT: - '../compiler-rt/lib/builtins/absvdi2.c' +# CHECK-NEXT: - '/Users/cbieneman/dev/open-source/llvm-build-rel' +# CHECK-NEXT: - int +# CHECK-NEXT: - di_int +# CHECK-NEXT: - long long int +# CHECK-NEXT: - __absvdi2 +# CHECK-NEXT: - a +# CHECK-NEXT: - N +# CHECK-NEXT: - t +# CHECK-NEXT: debug_abbrev: +# CHECK-NEXT: - Table: +# CHECK-NEXT: - Code: 0x0000000000000001 +# CHECK-NEXT: Tag: DW_TAG_compile_unit +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_producer +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_language +# CHECK-NEXT: Form: DW_FORM_data2 +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_stmt_list +# CHECK-NEXT: Form: DW_FORM_sec_offset +# CHECK-NEXT: - Attribute: DW_AT_comp_dir +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Code: 0x0000000000000002 +# CHECK-NEXT: Tag: DW_TAG_base_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_encoding +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_byte_size +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Code: 0x0000000000000003 +# CHECK-NEXT: Tag: DW_TAG_typedef +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Code: 0x0000000000000004 +# CHECK-NEXT: Tag: DW_TAG_subprogram +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Attribute: DW_AT_frame_base +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_prototyped +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Attribute: DW_AT_external +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Code: 0x0000000000000005 +# CHECK-NEXT: Tag: DW_TAG_formal_parameter +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_location +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Code: 0x0000000000000006 +# CHECK-NEXT: Tag: DW_TAG_variable +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_location +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Code: 0x0000000000000007 +# CHECK-NEXT: Tag: DW_TAG_const_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 diff --git a/llvm/test/ObjectYAML/MachO/DWARF-LittleEndian.yaml b/llvm/test/ObjectYAML/MachO/DWARF-LittleEndian.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-LittleEndian.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-LittleEndian.yaml @@ -263,212 +263,212 @@ - a - N - t - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000003 - Tag: DW_TAG_typedef - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Code: 0x00000004 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000005 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000006 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000007 - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 -... + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000003 + Tag: DW_TAG_typedef + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Code: 0x00000004 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000005 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000006 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000007 + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 -#CHECK: DWARF: -#CHECK: debug_str: -#CHECK: - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)' -#CHECK: - '../compiler-rt/lib/builtins/absvdi2.c' -#CHECK: - '/Users/cbieneman/dev/open-source/llvm-build-rel' -#CHECK: - int -#CHECK: - di_int -#CHECK: - long long int -#CHECK: - __absvdi2 -#CHECK: - a -#CHECK: - N -#CHECK: - t -#CHECK: debug_abbrev: -#CHECK: - Code: 0x0000000000000001 -#CHECK: Tag: DW_TAG_compile_unit -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_producer -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_language -#CHECK: Form: DW_FORM_data2 -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_stmt_list -#CHECK: Form: DW_FORM_sec_offset -#CHECK: - Attribute: DW_AT_comp_dir -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Code: 0x0000000000000002 -#CHECK: Tag: DW_TAG_base_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_encoding -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_byte_size -#CHECK: Form: DW_FORM_data1 -#CHECK: - Code: 0x0000000000000003 -#CHECK: Tag: DW_TAG_typedef -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Code: 0x0000000000000004 -#CHECK: Tag: DW_TAG_subprogram -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Attribute: DW_AT_frame_base -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_prototyped -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Attribute: DW_AT_external -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Code: 0x0000000000000005 -#CHECK: Tag: DW_TAG_formal_parameter -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_location -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Code: 0x0000000000000006 -#CHECK: Tag: DW_TAG_variable -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_location -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Code: 0x0000000000000007 -#CHECK: Tag: DW_TAG_const_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: ... +# CHECK: DWARF: +# CHECK-NEXT: debug_str: +# CHECK-NEXT: - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)' +# CHECK-NEXT: - '../compiler-rt/lib/builtins/absvdi2.c' +# CHECK-NEXT: - '/Users/cbieneman/dev/open-source/llvm-build-rel' +# CHECK-NEXT: - int +# CHECK-NEXT: - di_int +# CHECK-NEXT: - long long int +# CHECK-NEXT: - __absvdi2 +# CHECK-NEXT: - a +# CHECK-NEXT: - N +# CHECK-NEXT: - t +# CHECK-NEXT: debug_abbrev: +# CHECK-NEXT: - Table: +# CHECK-NEXT: - Code: 0x0000000000000001 +# CHECK-NEXT: Tag: DW_TAG_compile_unit +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_producer +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_language +# CHECK-NEXT: Form: DW_FORM_data2 +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_stmt_list +# CHECK-NEXT: Form: DW_FORM_sec_offset +# CHECK-NEXT: - Attribute: DW_AT_comp_dir +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Code: 0x0000000000000002 +# CHECK-NEXT: Tag: DW_TAG_base_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_encoding +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_byte_size +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Code: 0x0000000000000003 +# CHECK-NEXT: Tag: DW_TAG_typedef +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Code: 0x0000000000000004 +# CHECK-NEXT: Tag: DW_TAG_subprogram +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Attribute: DW_AT_frame_base +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_prototyped +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Attribute: DW_AT_external +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Code: 0x0000000000000005 +# CHECK-NEXT: Tag: DW_TAG_formal_parameter +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_location +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Code: 0x0000000000000006 +# CHECK-NEXT: Tag: DW_TAG_variable +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_location +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Code: 0x0000000000000007 +# CHECK-NEXT: Tag: DW_TAG_const_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml @@ -273,149 +273,150 @@ reserved1: 0x00000000 reserved2: 0x00000000 reserved3: 0x00000000 -DWARF: - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 -... +DWARF: + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 -#CHECK: DWARF: -#CHECK: debug_abbrev: -#CHECK: - Code: 0x0000000000000001 -#CHECK: Tag: DW_TAG_compile_unit -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_producer -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_language -#CHECK: Form: DW_FORM_data2 -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_stmt_list -#CHECK: Form: DW_FORM_sec_offset -#CHECK: - Attribute: DW_AT_comp_dir -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Code: 0x0000000000000002 -#CHECK: Tag: DW_TAG_subprogram -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_low_pc -#CHECK: Form: DW_FORM_addr -#CHECK: - Attribute: DW_AT_high_pc -#CHECK: Form: DW_FORM_data4 -#CHECK: - Attribute: DW_AT_frame_base -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_prototyped -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Attribute: DW_AT_external -#CHECK: Form: DW_FORM_flag_present -#CHECK: - Code: 0x0000000000000003 -#CHECK: Tag: DW_TAG_formal_parameter -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_location -#CHECK: Form: DW_FORM_exprloc -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_decl_file -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_decl_line -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 -#CHECK: - Code: 0x0000000000000004 -#CHECK: Tag: DW_TAG_base_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_name -#CHECK: Form: DW_FORM_strp -#CHECK: - Attribute: DW_AT_encoding -#CHECK: Form: DW_FORM_data1 -#CHECK: - Attribute: DW_AT_byte_size -#CHECK: Form: DW_FORM_data1 -#CHECK: - Code: 0x0000000000000005 -#CHECK: Tag: DW_TAG_pointer_type -#CHECK: Children: DW_CHILDREN_no -#CHECK: Attributes: -#CHECK: - Attribute: DW_AT_type -#CHECK: Form: DW_FORM_ref4 +# CHECK: DWARF: +# CHECK: debug_abbrev: +# CHECK-NEXT: - Table: +# CHECK-NEXT: - Code: 0x0000000000000001 +# CHECK-NEXT: Tag: DW_TAG_compile_unit +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_producer +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_language +# CHECK-NEXT: Form: DW_FORM_data2 +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_stmt_list +# CHECK-NEXT: Form: DW_FORM_sec_offset +# CHECK-NEXT: - Attribute: DW_AT_comp_dir +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Code: 0x0000000000000002 +# CHECK-NEXT: Tag: DW_TAG_subprogram +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_low_pc +# CHECK-NEXT: Form: DW_FORM_addr +# CHECK-NEXT: - Attribute: DW_AT_high_pc +# CHECK-NEXT: Form: DW_FORM_data4 +# CHECK-NEXT: - Attribute: DW_AT_frame_base +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_prototyped +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Attribute: DW_AT_external +# CHECK-NEXT: Form: DW_FORM_flag_present +# CHECK-NEXT: - Code: 0x0000000000000003 +# CHECK-NEXT: Tag: DW_TAG_formal_parameter +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_location +# CHECK-NEXT: Form: DW_FORM_exprloc +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_decl_file +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_decl_line +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 +# CHECK-NEXT: - Code: 0x0000000000000004 +# CHECK-NEXT: Tag: DW_TAG_base_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_name +# CHECK-NEXT: Form: DW_FORM_strp +# CHECK-NEXT: - Attribute: DW_AT_encoding +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Attribute: DW_AT_byte_size +# CHECK-NEXT: Form: DW_FORM_data1 +# CHECK-NEXT: - Code: 0x0000000000000005 +# CHECK-NEXT: Tag: DW_TAG_pointer_type +# CHECK-NEXT: Children: DW_CHILDREN_no +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: DW_AT_type +# CHECK-NEXT: Form: DW_FORM_ref4 diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml @@ -309,77 +309,78 @@ - __mh_execute_header - _main DWARF: - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_aranges: - Length: 44 Version: 2 @@ -390,10 +391,11 @@ - Address: 0x0000000100000F50 Length: 52 debug_info: - - Length: 117 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 117 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -513,10 +515,11 @@ # DWARF32: DWARF: # DWARF32: debug_info: -# DWARF32-NEXT: - Length: 117 -# DWARF32-NEXT: Version: 4 -# DWARF32-NEXT: AbbrOffset: 0 -# DWARF32-NEXT: AddrSize: 8 +# DWARF32-NEXT: - Length: 117 +# DWARF32-NEXT: Version: 4 +# DWARF32-NEXT: AbbrevTableIndex: 1 +# DWARF32-NEXT: AbbrOffset: 0 +# DWARF32-NEXT: AddrSize: 8 # DWARF32-NEXT: Entries: # DWARF32-NEXT: - AbbrCode: 0x00000001 # DWARF32-NEXT: Values: @@ -584,10 +587,11 @@ # RUN: obj2yaml | FileCheck %s --check-prefix=DWARF32-YAML # DWARF32-YAML: debug_info: -# DWARF32-YAML-NEXT: - Length: 12 -# DWARF32-YAML-NEXT: Version: 4 -# DWARF32-YAML-NEXT: AbbrOffset: 0 -# DWARF32-YAML-NEXT: AddrSize: 8 +# DWARF32-YAML-NEXT: - Length: 12 +# DWARF32-YAML-NEXT: Version: 4 +# DWARF32-YAML-NEXT: AbbrevTableIndex: 1 +# DWARF32-YAML-NEXT: AbbrOffset: 0 +# DWARF32-YAML-NEXT: AddrSize: 8 # DWARF32-YAML-NEXT: Entries: # DWARF32-YAML-NEXT: - AbbrCode: 0x00000001 # DWARF32-YAML-NEXT: Values: @@ -641,19 +645,21 @@ reserved2: 0x00000000 reserved3: 0x00000000 DWARF: - debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr + debug_abbrev: + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr debug_info: - - Format: [[FORMAT]] - Length: 12 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Format: [[FORMAT]] + Length: 12 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 1 Values: @@ -665,12 +671,255 @@ # RUN: obj2yaml | FileCheck %s --check-prefix=DWARF64-YAML # DWARF64-YAML: debug_info: -# DWARF64-YAML-NEXT: - Format: DWARF64 -# DWARF64-YAML-NEXT: Length: 12 -# DWARF64-YAML-NEXT: Version: 4 -# DWARF64-YAML-NEXT: AbbrOffset: 0 -# DWARF64-YAML-NEXT: AddrSize: 8 +# DWARF64-YAML-NEXT: - Format: DWARF64 +# DWARF64-YAML-NEXT: Length: 12 +# DWARF64-YAML-NEXT: Version: 4 +# DWARF64-YAML-NEXT: AbbrevTableIndex: 1 +# DWARF64-YAML-NEXT: AbbrOffset: 0 +# DWARF64-YAML-NEXT: AddrSize: 8 # DWARF64-YAML-NEXT: Entries: # DWARF64-YAML-NEXT: - AbbrCode: 0x00000001 # DWARF64-YAML-NEXT: Values: # DWARF64-YAML-NEXT: - Value: 0x0000000000001234 + +## c) Test that yaml2obj emits correct DWARF sections when 2 compilation units +## reference the same abbrev table and then obj2yaml is able to convert them back. + +# RUN: yaml2obj --docnum=3 %s | \ +# RUN: obj2yaml | FileCheck %s --check-prefix=SHARE-TABLE + +# SHARE-TABLE: DWARF: +# SHARE-TABLE-NEXT: debug_abbrev: +# SHARE-TABLE-NEXT: - Table: +# SHARE-TABLE-NEXT: - Code: 0x0000000000000001 +# SHARE-TABLE-NEXT: Tag: DW_TAG_compile_unit +# SHARE-TABLE-NEXT: Children: DW_CHILDREN_no +# SHARE-TABLE-NEXT: Attributes: +# SHARE-TABLE-NEXT: - Attribute: DW_AT_low_pc +# SHARE-TABLE-NEXT: Form: DW_FORM_addr +# SHARE-TABLE-NEXT: debug_info: +# SHARE-TABLE-NEXT: - Length: 16 +# SHARE-TABLE-NEXT: Version: 4 +# SHARE-TABLE-NEXT: AbbrevTableIndex: 1 +# SHARE-TABLE-NEXT: AbbrOffset: 0x0000000000000000 +# SHARE-TABLE-NEXT: AddrSize: 8 +# SHARE-TABLE-NEXT: Entries: +# SHARE-TABLE-NEXT: - AbbrCode: 0x00000001 +# SHARE-TABLE-NEXT: Values: +# SHARE-TABLE-NEXT: - Value: 0x0000000000001234 +# SHARE-TABLE-NEXT: - Length: 16 +# SHARE-TABLE-NEXT: Version: 4 +# SHARE-TABLE-NEXT: AbbrevTableIndex: 1 +# SHARE-TABLE-NEXT: AbbrOffset: 0x0000000000000000 +# SHARE-TABLE-NEXT: AddrSize: 8 +# SHARE-TABLE-NEXT: Entries: +# SHARE-TABLE-NEXT: - AbbrCode: 0x00000001 +# SHARE-TABLE-NEXT: Values: +# SHARE-TABLE-NEXT: - Value: 0x0000000000001234 + +--- !mach-o +FileHeader: + magic: 0xFEEDFACF + cputype: 0x01000007 + cpusubtype: 0x00000003 + filetype: 0x0000000A + ncmds: 1 + sizeofcmds: 232 + flags: 0x00000000 + reserved: 0x00000000 +LoadCommands: + - cmd: LC_SEGMENT_64 + cmdsize: 232 + segname: __DWARF + vmaddr: 0x00 + vmsize: 0x00 + fileoff: 0x00 + filesize: 0x00 + maxprot: 0 + initprot: 0 + nsects: 2 + flags: 0 + Sections: + - sectname: __debug_abbrev + segname: __DWARF + addr: 0x00 + size: 8 + offset: 528 + align: 0 + reloff: 0x00000000 + nreloc: 0 + flags: 0x00000000 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 + - sectname: __debug_info + segname: __DWARF + addr: 0x00 + size: 40 + offset: 1070 + align: 0 + reloff: 0x00000000 + nreloc: 0 + flags: 0x00000000 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 +DWARF: + debug_abbrev: + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + debug_info: + - Format: DWARF32 + Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 + Entries: + - AbbrCode: 1 + Values: + - Value: 0x1234 + - Format: DWARF32 + Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 + Entries: + - AbbrCode: 1 + Values: + - Value: 0x1234 + +## d) Test that yaml2obj emits correct DWARF sections when one compilation unit +## with lower offet references an abbrev table with higher offset and another one +## with higher offset references an abbrev table with lower offset and then obj2yaml +## is able to convert them back. + +# RUN: yaml2obj --docnum=4 %s | \ +# RUN: obj2yaml | FileCheck %s --check-prefix=CROSS-REFERENCE + +# CROSS-REFERENCE: DWARF: +# CROSS-REFERENCE-NEXT: debug_abbrev: +# CROSS-REFERENCE-NEXT: - Table: +# CROSS-REFERENCE-NEXT: - Code: 0x0000000000000001 +# CROSS-REFERENCE-NEXT: Tag: DW_TAG_compile_unit +# CROSS-REFERENCE-NEXT: Children: DW_CHILDREN_no +# CROSS-REFERENCE-NEXT: Attributes: +# CROSS-REFERENCE-NEXT: - Attribute: DW_AT_low_pc +# CROSS-REFERENCE-NEXT: Form: DW_FORM_data8 +# CROSS-REFERENCE-NEXT: - Table: +# CROSS-REFERENCE-NEXT: - Code: 0x0000000000000001 +# CROSS-REFERENCE-NEXT: Tag: DW_TAG_compile_unit +# CROSS-REFERENCE-NEXT: Children: DW_CHILDREN_no +# CROSS-REFERENCE-NEXT: Attributes: +# CROSS-REFERENCE-NEXT: - Attribute: DW_AT_high_pc +# CROSS-REFERENCE-NEXT: Form: DW_FORM_data4 +# CROSS-REFERENCE-NEXT: debug_info: +# CROSS-REFERENCE-NEXT: - Length: 12 +# CROSS-REFERENCE-NEXT: Version: 4 +# CROSS-REFERENCE-NEXT: AbbrevTableIndex: 2 +# CROSS-REFERENCE-NEXT: AbbrOffset: 0x0000000000000008 +# CROSS-REFERENCE-NEXT: AddrSize: 8 +# CROSS-REFERENCE-NEXT: Entries: +# CROSS-REFERENCE-NEXT: - AbbrCode: 0x00000001 +# CROSS-REFERENCE-NEXT: Values: +# CROSS-REFERENCE-NEXT: - Value: 0x0000000000001234 +# CROSS-REFERENCE-NEXT: - Length: 16 +# CROSS-REFERENCE-NEXT: Version: 4 +# CROSS-REFERENCE-NEXT: AbbrevTableIndex: 1 +# CROSS-REFERENCE-NEXT: AbbrOffset: 0x0000000000000000 +# CROSS-REFERENCE-NEXT: AddrSize: 8 +# CROSS-REFERENCE-NEXT: Entries: +# CROSS-REFERENCE-NEXT: - AbbrCode: 0x00000001 +# CROSS-REFERENCE-NEXT: Values: +# CROSS-REFERENCE-NEXT: - Value: 0x0000000000004321 + +--- !mach-o +FileHeader: + magic: 0xFEEDFACF + cputype: 0x01000007 + cpusubtype: 0x00000003 + filetype: 0x0000000A + ncmds: 1 + sizeofcmds: 232 + flags: 0x00000000 + reserved: 0x00000000 +LoadCommands: + - cmd: LC_SEGMENT_64 + cmdsize: 232 + segname: __DWARF + vmaddr: 0x00 + vmsize: 0x00 + fileoff: 0x00 + filesize: 0x00 + maxprot: 0 + initprot: 0 + nsects: 2 + flags: 0 + Sections: + - sectname: __debug_abbrev + segname: __DWARF + addr: 0x00 + size: 16 + offset: 528 + align: 0 + reloff: 0x00000000 + nreloc: 0 + flags: 0x00000000 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 + - sectname: __debug_info + segname: __DWARF + addr: 0x00 + size: 40 + offset: 1070 + align: 0 + reloff: 0x00000000 + nreloc: 0 + flags: 0x00000000 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 +DWARF: + debug_abbrev: + - Table: ## Referenced by compilation unit 2. + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_data8 + - Table: ## Referenced by compilation unit 1. + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + debug_info: + - Format: DWARF32 + Length: 12 + Version: 4 + AbbrevTableIndex: 2 + AbbrOffset: 8 + AddrSize: 8 + Entries: + - AbbrCode: 1 + Values: + - Value: 0x1234 + - Format: DWARF32 + Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 + Entries: + - AbbrCode: 1 + Values: + - Value: 0x4321 diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml @@ -322,77 +322,78 @@ - argv - int - char - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_aranges: - Length: 44 Version: 2 @@ -423,10 +424,11 @@ - DieOffset: 0x00000071 Name: char debug_info: - - Length: 117 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 117 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml @@ -169,38 +169,39 @@ - stripped2 - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_ranges - Form: DW_FORM_sec_offset - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_ranges + Form: DW_FORM_sec_offset + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_ranges: - Offset: 0x00000000 Entries: @@ -213,10 +214,11 @@ - LowOffset: 0x0000000000000000 HighOffset: 0x0000000000001000 debug_info: - - Length: 82 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 82 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml b/llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml @@ -276,68 +276,70 @@ DWARF: debug_str: - World - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: 0x2000 - Form: DW_FORM_addr - - Attribute: 0x2001 - Form: DW_FORM_block - - Attribute: DW_AT_MIPS_loop_begin - Form: DW_FORM_block1 - - Attribute: DW_AT_MIPS_tail_loop_begin - Form: DW_FORM_block2 - - Attribute: DW_AT_MIPS_epilog_begin - Form: DW_FORM_block4 - - Attribute: DW_AT_MIPS_loop_unroll_factor - Form: DW_FORM_data1 - - Attribute: DW_AT_MIPS_software_pipeline_depth - Form: DW_FORM_data2 - - Attribute: DW_AT_MIPS_linkage_name - Form: DW_FORM_data4 - - Attribute: DW_AT_MIPS_stride - Form: DW_FORM_data8 - - Attribute: DW_AT_MIPS_abstract_name - Form: DW_FORM_string - - Attribute: DW_AT_MIPS_clone_origin - Form: DW_FORM_strp - - Attribute: DW_AT_MIPS_has_inlines - Form: DW_FORM_ref_addr - - Attribute: DW_AT_MIPS_stride_byte - Form: DW_FORM_ref1 - - Attribute: DW_AT_MIPS_stride_elem - Form: DW_FORM_ref2 - - Attribute: DW_AT_MIPS_ptr_dopetype - Form: DW_FORM_ref4 - - Attribute: DW_AT_MIPS_allocatable_dopetype - Form: DW_FORM_ref8 - - Attribute: DW_AT_MIPS_assumed_shape_dopetype - Form: DW_FORM_ref_sig8 - - Attribute: DW_AT_MIPS_assumed_size - Form: DW_FORM_ref_udata - - Attribute: 0x2012 - Form: DW_FORM_flag - - Attribute: 0x2013 - Form: DW_FORM_flag - - Attribute: 0x2014 - Form: DW_FORM_flag_present - - Attribute: 0x2015 - Form: DW_FORM_sdata - - Attribute: 0x2017 - Form: DW_FORM_udata - - Attribute: 0x2018 - Form: DW_FORM_GNU_ref_alt - - Attribute: 0x2019 - Form: DW_FORM_sec_offset - - Attribute: 0x201A - Form: DW_FORM_addr + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: 0x2000 + Form: DW_FORM_addr + - Attribute: 0x2001 + Form: DW_FORM_block + - Attribute: DW_AT_MIPS_loop_begin + Form: DW_FORM_block1 + - Attribute: DW_AT_MIPS_tail_loop_begin + Form: DW_FORM_block2 + - Attribute: DW_AT_MIPS_epilog_begin + Form: DW_FORM_block4 + - Attribute: DW_AT_MIPS_loop_unroll_factor + Form: DW_FORM_data1 + - Attribute: DW_AT_MIPS_software_pipeline_depth + Form: DW_FORM_data2 + - Attribute: DW_AT_MIPS_linkage_name + Form: DW_FORM_data4 + - Attribute: DW_AT_MIPS_stride + Form: DW_FORM_data8 + - Attribute: DW_AT_MIPS_abstract_name + Form: DW_FORM_string + - Attribute: DW_AT_MIPS_clone_origin + Form: DW_FORM_strp + - Attribute: DW_AT_MIPS_has_inlines + Form: DW_FORM_ref_addr + - Attribute: DW_AT_MIPS_stride_byte + Form: DW_FORM_ref1 + - Attribute: DW_AT_MIPS_stride_elem + Form: DW_FORM_ref2 + - Attribute: DW_AT_MIPS_ptr_dopetype + Form: DW_FORM_ref4 + - Attribute: DW_AT_MIPS_allocatable_dopetype + Form: DW_FORM_ref8 + - Attribute: DW_AT_MIPS_assumed_shape_dopetype + Form: DW_FORM_ref_sig8 + - Attribute: DW_AT_MIPS_assumed_size + Form: DW_FORM_ref_udata + - Attribute: 0x2012 + Form: DW_FORM_flag + - Attribute: 0x2013 + Form: DW_FORM_flag + - Attribute: 0x2014 + Form: DW_FORM_flag_present + - Attribute: 0x2015 + Form: DW_FORM_sdata + - Attribute: 0x2017 + Form: DW_FORM_udata + - Attribute: 0x2018 + Form: DW_FORM_GNU_ref_alt + - Attribute: 0x2019 + Form: DW_FORM_sec_offset + - Attribute: 0x201A + Form: DW_FORM_addr debug_info: - - Length: 168 - Version: 2 - AbbrOffset: 0 - AddrSize: 8 + - Length: 168 + Version: 2 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -414,44 +416,47 @@ - Value: 0x0123456789ABCDEF ... -#CHECK: debug_info: -#CHECK: - Length: 168 -#CHECK: Version: 2 -#CHECK: AbbrOffset: 0 -#CHECK: AddrSize: 8 -#CHECK: Entries: -#CHECK: - AbbrCode: 0x00000001 -#CHECK: Values: -#CHECK: - Value: 0x0123456789ABCDEF -#CHECK: - Value: 0x000000000000000A -#CHECK: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -#CHECK: 0x08, 0x09, 0x00 ] -#CHECK: - Value: 0x000000000000000A -#CHECK: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -#CHECK: 0x08, 0x09, 0x00 ] -#CHECK: - Value: 0x000000000000000A -#CHECK: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -#CHECK: 0x08, 0x09, 0x00 ] -#CHECK: - Value: 0x000000000000000A -#CHECK: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -#CHECK: 0x08, 0x09, 0x00 ] -#CHECK: - Value: 0x0000000000000001 -#CHECK: - Value: 0x0000000000002345 -#CHECK: - Value: 0x000000006789ABCD -#CHECK: - Value: 0x0011223344556677 -#CHECK: CStr: Hello -#CHECK: - Value: 0x0000000000000000 -#CHECK: - Value: 0x0000000012345678 -#CHECK: - Value: 0x0000000000000001 -#CHECK: - Value: 0x0000000000002345 -#CHECK: - Value: 0x000000006789ABCD -#CHECK: - Value: 0x0011223344556677 -#CHECK: - Value: 0xAABBCCDDEEFF0011 -#CHECK: - Value: 0xFFFFFFFFFFFFFFFE -#CHECK: - Value: 0x0000000000000001 -#CHECK: - Value: 0x0000000000000000 -#CHECK: - Value: 0x0000000000000001 -#CHECK: - Value: 0xFFFFFFFFFFFFFFFE -#CHECK: - Value: 0x0000000000000001 -#CHECK: - Value: 0x0000000000000002 -#CHECK: - Value: 0x0123456789ABCDEF +# CHECK: debug_info: +# CHECK-NEXT: - Length: 168 +# CHECK-NEXT: Version: 2 +# CHECK-NEXT: AbbrevTableIndex: 1 +# CHECK-NEXT: AbbrOffset: 0 +# CHECK-NEXT: AddrSize: 8 +# CHECK-NEXT: Entries: +# CHECK-NEXT: - AbbrCode: 0x00000001 +# CHECK-NEXT: Values: +# CHECK-NEXT: - Value: 0x0123456789ABCDEF +# CHECK-NEXT: - Value: 0x000000000000000A +# CHECK-NEXT: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, +# CHECK-NEXT: 0x08, 0x09, 0x00 ] +# CHECK-NEXT: - Value: 0x000000000000000A +# CHECK-NEXT: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, +# CHECK-NEXT: 0x08, 0x09, 0x00 ] +# CHECK-NEXT: - Value: 0x000000000000000A +# CHECK-NEXT: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, +# CHECK-NEXT: 0x08, 0x09, 0x00 ] +# CHECK-NEXT: - Value: 0x000000000000000A +# CHECK-NEXT: BlockData: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, +# CHECK-NEXT: 0x08, 0x09, 0x00 ] +# CHECK-NEXT: - Value: 0x0000000000000001 +# CHECK-NEXT: - Value: 0x0000000000002345 +# CHECK-NEXT: - Value: 0x000000006789ABCD +# CHECK-NEXT: - Value: 0x0011223344556677 +# CHECK-NEXT: - Value: 0xDEADBEEFDEADBEEF +# CHECK-NEXT: CStr: Hello +# CHECK-NEXT: - Value: 0x0000000000000000 +# CHECK-NEXT: - Value: 0x0000000012345678 +# CHECK-NEXT: - Value: 0x0000000000000001 +# CHECK-NEXT: - Value: 0x0000000000002345 +# CHECK-NEXT: - Value: 0x000000006789ABCD +# CHECK-NEXT: - Value: 0x0011223344556677 +# CHECK-NEXT: - Value: 0xAABBCCDDEEFF0011 +# CHECK-NEXT: - Value: 0xFFFFFFFFFFFFFFFE +# CHECK-NEXT: - Value: 0x0000000000000001 +# CHECK-NEXT: - Value: 0x0000000000000000 +# CHECK-NEXT: - Value: 0x0000000000000001 +# CHECK-NEXT: - Value: 0xDEADBEEFDEADBEEF +# CHECK-NEXT: - Value: 0xFFFFFFFFFFFFFFFE +# CHECK-NEXT: - Value: 0x0000000000000001 +# CHECK-NEXT: - Value: 0x0000000000000002 +# CHECK-NEXT: - Value: 0x0123456789ABCDEF diff --git a/llvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml b/llvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml @@ -274,22 +274,24 @@ reserved2: 0x00000000 reserved3: 0x00000000 DWARF: - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: 0x2001 - Form: DW_FORM_implicit_const - Value: 0x12345678 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: 0x2001 + Form: DW_FORM_implicit_const + Value: 0x12345678 ... -#CHECK: DWARF: -#CHECK: debug_abbrev: -#CHECK: - Code: 0x0000000000000001 -#CHECK: Tag: DW_TAG_compile_unit -#CHECK: Children: DW_CHILDREN_yes -#CHECK: Attributes: -#CHECK: - Attribute: 0x2001 -#CHECK: Form: DW_FORM_implicit_const -#CHECK: Value: 0x0000000012345678 +# CHECK: DWARF: +# CHECK: debug_abbrev: +# CHECK-NEXT: - Table: +# CHECK-NEXT: - Code: 0x0000000000000001 +# CHECK-NEXT: Tag: DW_TAG_compile_unit +# CHECK-NEXT: Children: DW_CHILDREN_yes +# CHECK-NEXT: Attributes: +# CHECK-NEXT: - Attribute: 0x2001 +# CHECK-NEXT: Form: DW_FORM_implicit_const +# CHECK-NEXT: Value: 0x0000000012345678 diff --git a/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml b/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml @@ -309,77 +309,78 @@ - __mh_execute_header - _main DWARF: - debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_prototyped - Form: DW_FORM_flag_present - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + debug_abbrev: + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_prototyped + Form: DW_FORM_flag_present + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_aranges: - Length: 44 Version: 2 @@ -390,11 +391,12 @@ - Address: 0x0000000100000F50 Length: 52 debug_info: - - Length: 118 - Version: 5 - UnitType: DW_UT_compile - AbbrOffset: 0 - AddrSize: 8 + - Length: 118 + Version: 5 + UnitType: DW_UT_compile + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -513,11 +515,12 @@ # DWARF32: DWARF: # DWARF32: debug_info: -# DWARF32-NEXT: - Length: 118 -# DWARF32-NEXT: Version: 5 -# DWARF32-NEXT: UnitType: DW_UT_compile -# DWARF32-NEXT: AbbrOffset: 0 -# DWARF32-NEXT: AddrSize: 8 +# DWARF32-NEXT: - Length: 118 +# DWARF32-NEXT: Version: 5 +# DWARF32-NEXT: UnitType: DW_UT_compile +# DWARF32-NEXT: AbbrevTableIndex: 1 +# DWARF32-NEXT: AbbrOffset: 0 +# DWARF32-NEXT: AddrSize: 8 # DWARF32-NEXT: Entries: # DWARF32-NEXT: - AbbrCode: 0x00000001 # DWARF32-NEXT: Values: @@ -585,11 +588,12 @@ # RUN: obj2yaml | FileCheck %s --check-prefix=DWARF32-YAML # DWARF32-YAML: debug_info: -# DWARF32-YAML-NEXT: - Length: 12 -# DWARF32-YAML-NEXT: Version: 5 -# DWARF32-YAML-NEXT: UnitType: DW_UT_compile -# DWARF32-YAML-NEXT: AbbrOffset: 0x0000000000000000 -# DWARF32-YAML-NEXT: AddrSize: 8 +# DWARF32-YAML-NEXT: - Length: 12 +# DWARF32-YAML-NEXT: Version: 5 +# DWARF32-YAML-NEXT: UnitType: DW_UT_compile +# DWARF32-YAML-NEXT: AbbrevTableIndex: 1 +# DWARF32-YAML-NEXT: AbbrOffset: 0x0000000000000000 +# DWARF32-YAML-NEXT: AddrSize: 8 # DWARF32-YAML-NEXT: Entries: # DWARF32-YAML-NEXT: - AbbrCode: 0x00000001 # DWARF32-YAML-NEXT: Values: @@ -643,20 +647,22 @@ reserved2: 0x00000000 reserved3: 0x00000000 DWARF: - debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr + debug_abbrev: + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr debug_info: - - Format: [[FORMAT]] - Length: [[LENGTH]] - Version: 5 - UnitType: DW_UT_compile - AbbrOffset: 0 - AddrSize: 8 + - Format: [[FORMAT]] + Length: [[LENGTH]] + Version: 5 + UnitType: DW_UT_compile + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 1 Values: @@ -668,12 +674,13 @@ # RUN: obj2yaml | FileCheck %s --check-prefix=DWARF64-YAML # DWARF64-YAML: debug_info: -# DWARF64-YAML-NEXT: - Format: DWARF64 -# DWARF64-YAML-NEXT: Length: 20 -# DWARF64-YAML-NEXT: Version: 5 -# DWARF64-YAML-NEXT: UnitType: DW_UT_compile -# DWARF64-YAML-NEXT: AbbrOffset: 0x0000000000000000 -# DWARF64-YAML-NEXT: AddrSize: 8 +# DWARF64-YAML-NEXT: - Format: DWARF64 +# DWARF64-YAML-NEXT: Length: 20 +# DWARF64-YAML-NEXT: Version: 5 +# DWARF64-YAML-NEXT: UnitType: DW_UT_compile +# DWARF64-YAML-NEXT: AbbrevTableIndex: 1 +# DWARF64-YAML-NEXT: AbbrOffset: 0x0000000000000000 +# DWARF64-YAML-NEXT: AddrSize: 8 # DWARF64-YAML-NEXT: Entries: # DWARF64-YAML-NEXT: - AbbrCode: 0x00000001 # DWARF64-YAML-NEXT: Values: diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml --- a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml +++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml @@ -178,38 +178,39 @@ - main - foo debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_ranges - Form: DW_FORM_sec_offset - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_ranges + Form: DW_FORM_sec_offset + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_ranges: - Offset: 0x00000000 AddrSize: 0x08 @@ -223,10 +224,11 @@ - LowOffset: 0x0000000000001000 HighOffset: 0x0000000000002000 debug_info: - - Length: 99 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 99 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml --- a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml +++ b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml @@ -299,84 +299,85 @@ - int - char debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_GNU_pubnames - Form: DW_FORM_flag_present - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Attribute: DW_AT_APPLE_isa - Form: DW_FORM_flag - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000006 - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_GNU_pubnames + Form: DW_FORM_flag_present + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Attribute: DW_AT_APPLE_isa + Form: DW_FORM_flag + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000006 + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr debug_aranges: - Length: 28 Version: 2 @@ -407,10 +408,11 @@ - DieOffset: 0x0000006F Name: char debug_info: - - Length: 115 - Version: 4 - AbbrOffset: 0 - AddrSize: 4 + - Length: 115 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 4 Entries: - AbbrCode: 0x00000001 Values: @@ -779,82 +781,83 @@ - int - char debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_GNU_pubnames - Form: DW_FORM_flag_present - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000004 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000006 - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_GNU_pubnames + Form: DW_FORM_flag_present + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000004 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000006 + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr debug_aranges: - Length: 44 Version: 2 @@ -885,10 +888,11 @@ - DieOffset: 0x00000076 Name: char debug_info: - - Length: 122 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 122 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml --- a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml +++ b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml @@ -384,160 +384,161 @@ - argv - char debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_GNU_pubnames - Form: DW_FORM_flag_present - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref_addr - - Code: 0x00000003 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref_addr - - Code: 0x00000004 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_linkage_name - Form: DW_FORM_strp - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Attribute: DW_AT_inline - Form: DW_FORM_data1 - - Code: 0x00000005 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000006 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000007 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Code: 0x00000008 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x00000009 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x0000000A - Tag: DW_TAG_inlined_subroutine - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_abstract_origin - Form: DW_FORM_ref_addr - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_call_file - Form: DW_FORM_data1 - - Attribute: DW_AT_call_line - Form: DW_FORM_data1 - - Code: 0x0000000B - Tag: DW_TAG_pointer_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr - - Code: 0x0000000C - Tag: DW_TAG_const_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_GNU_pubnames + Form: DW_FORM_flag_present + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref_addr + - Code: 0x00000003 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref_addr + - Code: 0x00000004 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_linkage_name + Form: DW_FORM_strp + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Attribute: DW_AT_inline + Form: DW_FORM_data1 + - Code: 0x00000005 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000006 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000007 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Code: 0x00000008 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x00000009 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x0000000A + Tag: DW_TAG_inlined_subroutine + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_abstract_origin + Form: DW_FORM_ref_addr + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_call_file + Form: DW_FORM_data1 + - Attribute: DW_AT_call_line + Form: DW_FORM_data1 + - Code: 0x0000000B + Tag: DW_TAG_pointer_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr + - Code: 0x0000000C + Tag: DW_TAG_const_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr debug_aranges: - Length: 60 Version: 2 @@ -574,10 +575,11 @@ - DieOffset: 0x000000D8 Name: char debug_info: - - Length: 220 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 220 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml --- a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml +++ b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml @@ -312,89 +312,91 @@ - bar - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Attribute: DW_AT_comp_dir - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000002 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Code: 0x00000003 - Tag: DW_TAG_base_type - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_encoding - Form: DW_FORM_data1 - - Attribute: DW_AT_byte_size - Form: DW_FORM_data1 - - Code: 0x00000004 - Tag: DW_TAG_variable - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_location - Form: DW_FORM_exprloc - - Code: 0x00000005 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_frame_base - Form: DW_FORM_exprloc - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_external - Form: DW_FORM_flag_present + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Attribute: DW_AT_comp_dir + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000002 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Code: 0x00000003 + Tag: DW_TAG_base_type + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_encoding + Form: DW_FORM_data1 + - Attribute: DW_AT_byte_size + Form: DW_FORM_data1 + - Code: 0x00000004 + Tag: DW_TAG_variable + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_location + Form: DW_FORM_exprloc + - Code: 0x00000005 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_frame_base + Form: DW_FORM_exprloc + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_external + Form: DW_FORM_flag_present debug_info: - - Length: 113 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 113 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml --- a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml +++ b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml @@ -55,42 +55,43 @@ Machine: EM_X86_64 DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_producer - Form: DW_FORM_strp - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_name - Form: DW_FORM_strx - - Code: 2 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addrx - - Code: 3 - ## Test a reserved tag value. - Tag: 0x06 - Children: DW_CHILDREN_no - Attributes: - ## Test an attribute value that is more than one byte. - - Attribute: DW_AT_call_pc - ## Test a form value that is more than one byte. - Form: 0x81 - ## Test a reserved attribute value. - - Attribute: 0x04 - ## Test a reserved form value. - Form: 0x02 - - Attribute: 0x2020 - ## Test one special attribute form DW_FORM_implicit_const, - ## who is followed by a SLEB128 value. - Form: DW_FORM_implicit_const - Value: 12345678 + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_producer + Form: DW_FORM_strp + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_name + Form: DW_FORM_strx + - Code: 2 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addrx + - Code: 3 + ## Test a reserved tag value. + Tag: 0x06 + Children: DW_CHILDREN_no + Attributes: + ## Test an attribute value that is more than one byte. + - Attribute: DW_AT_call_pc + ## Test a form value that is more than one byte. + Form: 0x81 + ## Test a reserved attribute value. + - Attribute: 0x04 + ## Test a reserved form value. + Form: 0x02 + - Attribute: 0x2020 + ## Test one special attribute form DW_FORM_implicit_const, + ## who is followed by a SLEB128 value. + Form: DW_FORM_implicit_const + Value: 12345678 ## b) Generate the .debug_abbrev section from raw section content. @@ -153,10 +154,11 @@ Size: 0x10 DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] ## e) Test that yaml2obj emits an error message when both the "Content" and the ## "debug_abbrev" entry are specified at the same time. @@ -175,10 +177,11 @@ Content: "00" DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] ## f) Test that all the properties can be overridden by the section header when ## the "debug_abbrev" entry doesn't exist. @@ -236,10 +239,11 @@ Type: SHT_STRTAB DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] ## h) Test that yaml2obj automatically generates abbreviation codes for us. @@ -264,23 +268,24 @@ Machine: EM_X86_64 DWARF: debug_abbrev: - - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] - - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: [] - - Code: 4 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: [] - - Code: 4 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: [] - - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: [] - - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] + - Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: [] + - Code: 4 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: [] + - Code: 4 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: [] + - Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: [] + - Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: [] diff --git a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml --- a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml +++ b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml @@ -110,101 +110,103 @@ Machine: EM_X86_64 DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: 0x01 - Form: DW_FORM_addr ## 0x01 - - Attribute: 0x01 - Form: DW_FORM_block2 ## 0x03 - - Attribute: 0x01 - Form: DW_FORM_block4 ## 0x04 - - Attribute: 0x01 - Form: DW_FORM_data2 ## 0x05 - - Attribute: 0x01 - Form: DW_FORM_data4 ## 0x06 - - Attribute: 0x01 - Form: DW_FORM_data8 ## 0x07 - - Attribute: 0x01 - Form: DW_FORM_string ## 0x08 - - Attribute: 0x01 - Form: DW_FORM_block ## 0x09 - - Attribute: 0x01 - Form: DW_FORM_block1 ## 0x0a - - Attribute: 0x01 - Form: DW_FORM_data1 ## 0x0b - - Attribute: 0x01 - Form: DW_FORM_flag ## 0x0c - - Attribute: 0x01 - Form: DW_FORM_sdata ## 0x0d - - Attribute: 0x01 - Form: DW_FORM_strp ## 0x0e - - Attribute: 0x01 - Form: DW_FORM_udata ## 0x0f - - Attribute: 0x01 - Form: DW_FORM_ref_addr ## 0x10 - - Attribute: 0x01 - Form: DW_FORM_ref1 ## 0x11 - - Attribute: 0x01 - Form: DW_FORM_ref2 ## 0x12 - - Attribute: 0x01 - Form: DW_FORM_ref4 ## 0x13 - - Attribute: 0x01 - Form: DW_FORM_ref8 ## 0x14 - - Attribute: 0x01 - Form: DW_FORM_ref_udata ## 0x15 - - Attribute: 0x01 - Form: DW_FORM_indirect ## 0x16 - - Attribute: 0x01 - Form: DW_FORM_sec_offset ## 0x17 - - Attribute: 0x01 - Form: DW_FORM_exprloc ## 0x18 - - Attribute: 0x01 - Form: DW_FORM_strx ## 0x1a - - Attribute: 0x01 - Form: DW_FORM_addrx ## 0x1b - - Attribute: 0x01 - Form: DW_FORM_ref_sup4 ## 0x1c - - Attribute: 0x01 - Form: DW_FORM_strp_sup ## 0x1d - - Attribute: 0x01 - Form: DW_FORM_data16 ## 0x1e - - Attribute: 0x01 - Form: DW_FORM_line_strp ## 0x1f - - Attribute: 0x01 - Form: DW_FORM_ref_sig8 ## 0x20 - - Attribute: 0x01 - Form: DW_FORM_implicit_const ## 0x21 - Value: 0x01 - - Attribute: 0x01 - Form: DW_FORM_loclistx ## 0x22 - - Attribute: 0x01 - Form: DW_FORM_rnglistx ## 0x23 - - Attribute: 0x01 - Form: DW_FORM_ref_sup8 ## 0x24 - - Attribute: 0x01 - Form: DW_FORM_strx1 ## 0x25 - - Attribute: 0x01 - Form: DW_FORM_strx2 ## 0x26 - - Attribute: 0x01 - Form: DW_FORM_strx3 ## 0x27 - - Attribute: 0x01 - Form: DW_FORM_strx4 ## 0x28 - - Attribute: 0x01 - Form: DW_FORM_addrx1 ## 0x29 - - Attribute: 0x01 - Form: DW_FORM_addrx2 ## 0x2a - - Attribute: 0x01 - Form: DW_FORM_addrx3 ## 0x2b - - Attribute: 0x01 - Form: DW_FORM_addrx4 ## 0x2c + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: 0x01 + Form: DW_FORM_addr ## 0x01 + - Attribute: 0x01 + Form: DW_FORM_block2 ## 0x03 + - Attribute: 0x01 + Form: DW_FORM_block4 ## 0x04 + - Attribute: 0x01 + Form: DW_FORM_data2 ## 0x05 + - Attribute: 0x01 + Form: DW_FORM_data4 ## 0x06 + - Attribute: 0x01 + Form: DW_FORM_data8 ## 0x07 + - Attribute: 0x01 + Form: DW_FORM_string ## 0x08 + - Attribute: 0x01 + Form: DW_FORM_block ## 0x09 + - Attribute: 0x01 + Form: DW_FORM_block1 ## 0x0a + - Attribute: 0x01 + Form: DW_FORM_data1 ## 0x0b + - Attribute: 0x01 + Form: DW_FORM_flag ## 0x0c + - Attribute: 0x01 + Form: DW_FORM_sdata ## 0x0d + - Attribute: 0x01 + Form: DW_FORM_strp ## 0x0e + - Attribute: 0x01 + Form: DW_FORM_udata ## 0x0f + - Attribute: 0x01 + Form: DW_FORM_ref_addr ## 0x10 + - Attribute: 0x01 + Form: DW_FORM_ref1 ## 0x11 + - Attribute: 0x01 + Form: DW_FORM_ref2 ## 0x12 + - Attribute: 0x01 + Form: DW_FORM_ref4 ## 0x13 + - Attribute: 0x01 + Form: DW_FORM_ref8 ## 0x14 + - Attribute: 0x01 + Form: DW_FORM_ref_udata ## 0x15 + - Attribute: 0x01 + Form: DW_FORM_indirect ## 0x16 + - Attribute: 0x01 + Form: DW_FORM_sec_offset ## 0x17 + - Attribute: 0x01 + Form: DW_FORM_exprloc ## 0x18 + - Attribute: 0x01 + Form: DW_FORM_strx ## 0x1a + - Attribute: 0x01 + Form: DW_FORM_addrx ## 0x1b + - Attribute: 0x01 + Form: DW_FORM_ref_sup4 ## 0x1c + - Attribute: 0x01 + Form: DW_FORM_strp_sup ## 0x1d + - Attribute: 0x01 + Form: DW_FORM_data16 ## 0x1e + - Attribute: 0x01 + Form: DW_FORM_line_strp ## 0x1f + - Attribute: 0x01 + Form: DW_FORM_ref_sig8 ## 0x20 + - Attribute: 0x01 + Form: DW_FORM_implicit_const ## 0x21 + Value: 0x01 + - Attribute: 0x01 + Form: DW_FORM_loclistx ## 0x22 + - Attribute: 0x01 + Form: DW_FORM_rnglistx ## 0x23 + - Attribute: 0x01 + Form: DW_FORM_ref_sup8 ## 0x24 + - Attribute: 0x01 + Form: DW_FORM_strx1 ## 0x25 + - Attribute: 0x01 + Form: DW_FORM_strx2 ## 0x26 + - Attribute: 0x01 + Form: DW_FORM_strx3 ## 0x27 + - Attribute: 0x01 + Form: DW_FORM_strx4 ## 0x28 + - Attribute: 0x01 + Form: DW_FORM_addrx1 ## 0x29 + - Attribute: 0x01 + Form: DW_FORM_addrx2 ## 0x2a + - Attribute: 0x01 + Form: DW_FORM_addrx3 ## 0x2b + - Attribute: 0x01 + Form: DW_FORM_addrx4 ## 0x2c debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 Entries: - AbbrCode: 1 Values: @@ -261,20 +263,22 @@ - Value: 0x1234 ## DW_FORM_addrx2 - Value: 0x123456 ## DW_FORM_addrx3 (unimplemented) - Value: 0x12345678 ## DW_FORM_addrx4 - - Length: 0x1234 - Version: 5 + - Length: 0x1234 + Version: 5 ## Test another unit type. - UnitType: DW_UT_compile - AbbrOffset: 0x1234 - AddrSize: 4 + UnitType: DW_UT_compile + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 Entries: - AbbrCode: 0 Values: [] - - Length: 0x5678 + - Length: 0x5678 ## Test DWARFv4 - Version: 4 - AbbrOffset: 0x5678 - AddrSize: 4 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0x5678 + AddrSize: 4 Entries: - AbbrCode: 1 Values: @@ -432,17 +436,19 @@ Size: 0x10 DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 - Entries: [] + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 + Entries: [] ## e) Test that yaml2obj emits an error message when both the "Content" and the ## "debug_info" entry are specified at the same time. @@ -461,17 +467,19 @@ Content: "00" DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 - Entries: [] + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 + Entries: [] ## f) Test that all the properties can be overridden by the section header when ## the "debug_info" entry doesn't exist. @@ -529,16 +537,18 @@ Type: SHT_STRTAB DWARF: debug_abbrev: - - Code: 1 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: [] + - Table: + - Code: 1 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: [] debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 Entries: - AbbrCode: 0 Values: [] @@ -562,12 +572,13 @@ Machine: EM_X86_64 DWARF: debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 - Entries: [] + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 + Entries: [] ## h) Test that yaml2obj emits values in the DIE according to the abbreviation whose ## index is equal to the value in 'AbbrevCode'. @@ -598,26 +609,28 @@ Machine: EM_X86_64 DWARF: debug_abbrev: - - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_high_pc - Form: DW_FORM_data2 - - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_data2 - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 + - Table: + - Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_high_pc + Form: DW_FORM_data2 + - Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_data2 + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 Entries: ## Test that yaml2obj emits values when the abbrev code is specified. - AbbrCode: 2 @@ -636,12 +649,42 @@ - Value: 0x1234 ## i) Test that yaml2obj reports an error when 'debug_info' has values in its +## compilation unit entries but 'debug_abbrev' doesn't have the associated abbrev +## table for it. + +# RUN: not yaml2obj --docnum=10 %s 2>&1 | \ +# RUN: FileCheck %s --check-prefixes=NOTABLE + +# NOTABLE: yaml2obj: error: abbrev table index must be less than or equal to the number of abbrev tables + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 +DWARF: + debug_abbrev: + - Table: [] + debug_info: + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 2 ## We want to use the abbrev table with index 2 which doesn't exist. + AbbrOffset: 0x1234 + AddrSize: 4 + Entries: + - AbbrCode: 1 + Values: + - Value: 0x1234 + +## j) Test that yaml2obj reports an error when 'debug_info' has values in its ## entries but 'debug_abbrev' doesn't have enough attributes for them. -# RUN: not yaml2obj --docnum=10 %s -o %t10.o 2>&1 | \ -# RUN: FileCheck %s --check-prefixes=ERROR +# RUN: not yaml2obj --docnum=11 %s 2>&1 | \ +# RUN: FileCheck %s --check-prefixes=NOATTR -# ERROR: yaml2obj: error: abbrev code must be less than or equal to the number of entries in abbreviation table +# NOATTR: yaml2obj: error: abbrev code must be less than or equal to the number of entries in abbreviation table --- !ELF FileHeader: @@ -650,23 +693,26 @@ Type: ET_EXEC Machine: EM_X86_64 DWARF: + debug_abbrev: + - Table: [] debug_info: - - Length: 0x1234 - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 4 + - Length: 0x1234 + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 4 Entries: - AbbrCode: 1 Values: - Value: 0x1234 -## j) Test that yaml2obj emits the correct DWARF64 unit headers. +## k) Test that yaml2obj emits the correct DWARF64 unit headers. ## DWARFv5 unit header. -# RUN: yaml2obj --docnum=11 %s -o %t11.o -# RUN: llvm-readelf --hex-dump=.debug_info %t11.o | \ +# RUN: yaml2obj --docnum=12 %s -o %t12.o +# RUN: llvm-readelf --hex-dump=.debug_info %t12.o | \ # RUN: FileCheck %s --check-prefix=DWARFV5-HEADER # DWARFV5-HEADER: Hex dump of section '.debug_info': @@ -686,18 +732,19 @@ Machine: EM_X86_64 DWARF: debug_info: - - Format: DWARF64 - Length: 0x0c - Version: 5 - UnitType: DW_UT_type - AbbrOffset: 0x1234 - AddrSize: 8 - Entries: [] + - Format: DWARF64 + Length: 0x0c + Version: 5 + UnitType: DW_UT_type + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 8 + Entries: [] ## DWARFv4 unit header. -# RUN: yaml2obj --docnum=12 %s -o %t12.o -# RUN: llvm-readelf --hex-dump=.debug_info %t12.o | \ +# RUN: yaml2obj --docnum=13 %s -o %t13.o +# RUN: llvm-readelf --hex-dump=.debug_info %t13.o | \ # RUN: FileCheck %s --check-prefix=DWARFV4-HEADER # DWARFV4-HEADER: Hex dump of section '.debug_info': @@ -717,9 +764,10 @@ Machine: EM_X86_64 DWARF: debug_info: - - Format: DWARF64 - Length: 0x0c - Version: 4 - AbbrOffset: 0x1234 - AddrSize: 8 - Entries: [] + - Format: DWARF64 + Length: 0x0c + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0x1234 + AddrSize: 8 + Entries: [] diff --git a/llvm/tools/obj2yaml/dwarf2yaml.cpp b/llvm/tools/obj2yaml/dwarf2yaml.cpp --- a/llvm/tools/obj2yaml/dwarf2yaml.cpp +++ b/llvm/tools/obj2yaml/dwarf2yaml.cpp @@ -16,6 +16,7 @@ #include "llvm/ObjectYAML/DWARFYAML.h" #include +#include using namespace llvm; @@ -30,6 +31,7 @@ auto AbbrevSetPtr = DCtx.getDebugAbbrev(); if (AbbrevSetPtr) { for (auto AbbrvDeclSet : *AbbrevSetPtr) { + DWARFYAML::AbbrevTable AbbrevTable; for (auto AbbrvDecl : AbbrvDeclSet.second) { DWARFYAML::Abbrev Abbrv; Abbrv.Code = AbbrvDecl.getCode(); @@ -44,8 +46,10 @@ AttAbrv.Value = Attribute.getImplicitConstValue(); Abbrv.Attributes.push_back(AttAbrv); } - Y.AbbrevDecls.push_back(Abbrv); + AbbrevTable.AbbrevDecls.push_back(Abbrv); } + + Y.DebugAbbrev.push_back(AbbrevTable); } } } @@ -170,6 +174,17 @@ NewUnit.Version = CU->getVersion(); if(NewUnit.Version >= 5) NewUnit.Type = (dwarf::UnitType)CU->getUnitType(); + const DWARFDebugAbbrev* DebugAbbrev = DCtx.getDebugAbbrev(); + NewUnit.AbbrevTableIndex = + std::distance( + DebugAbbrev->begin(), + std::find_if( + DebugAbbrev->begin(), DebugAbbrev->end(), + [&](const std::pair + &P) { + return P.first == CU->getAbbreviations()->getOffset(); + })) + + 1; NewUnit.AbbrOffset = CU->getAbbreviations()->getOffset(); NewUnit.AddrSize = CU->getAddressByteSize(); for (auto DIE : CU->dies()) { diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -1363,15 +1363,17 @@ TEST(DWARFDebugInfo, TestEmptyChildren) { const char *yamldata = "debug_abbrev:\n" - " - Code: 0x00000001\n" - " Tag: DW_TAG_compile_unit\n" - " Children: DW_CHILDREN_yes\n" - " Attributes:\n" + " - Table:\n" + " - Code: 0x00000001\n" + " Tag: DW_TAG_compile_unit\n" + " Children: DW_CHILDREN_yes\n" + " Attributes:\n" "debug_info:\n" - " - Length: 0\n" - " Version: 4\n" - " AbbrOffset: 0\n" - " AddrSize: 8\n" + " - Length: 0\n" + " Version: 4\n" + " AbbrevTableIndex: 1\n" + " AbbrOffset: 0\n" + " AddrSize: 8\n" " Entries:\n" " - AbbrCode: 0x00000001\n" " Values:\n" @@ -1886,25 +1888,27 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref4 + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref4 debug_info: - - Length: 22 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 22 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1934,25 +1938,27 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr debug_info: - - Length: 22 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 22 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1980,19 +1986,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_ranges - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_ranges + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2017,20 +2025,22 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_ranges - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_ranges + Form: DW_FORM_sec_offset debug_info: - - Length: 17 - Version: 5 - UnitType: DW_UT_compile - AbbrOffset: 0 - AddrSize: 8 + - Length: 17 + Version: 5 + UnitType: DW_UT_compile + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2054,19 +2064,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2090,17 +2102,19 @@ debug_str: - '' debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp debug_info: - - Length: 12 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 12 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2123,25 +2137,27 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref_addr debug_info: - - Length: 22 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 22 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2170,19 +2186,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2238,19 +2256,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2308,19 +2328,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2379,19 +2401,21 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2455,28 +2479,31 @@ - /tmp/main.c - /tmp/foo.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset debug_info: - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: - Value: 0x0000000000000001 - Value: 0x0000000000000000 - - Length: 16 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 16 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2570,29 +2597,31 @@ - '' - /tmp/main.c debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 46 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 46 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2623,35 +2652,37 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Code: 0x00000003 - Tag: DW_TAG_lexical_block - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Code: 0x00000003 + Tag: DW_TAG_lexical_block + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 52 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 52 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2688,27 +2719,29 @@ - main - foo debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 55 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 55 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2742,39 +2775,41 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Code: 0x00000003 - Tag: DW_TAG_lexical_block - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Code: 0x00000003 + Tag: DW_TAG_lexical_block + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 85 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 85 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2815,27 +2850,29 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 34 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 34 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2867,31 +2904,33 @@ - main - elided debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 71 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 71 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2929,31 +2968,33 @@ - main - nested debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 73 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 73 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp @@ -21,24 +21,26 @@ TEST(DWARFDie, getLocations) { const char *yamldata = R"( debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_location - Form: DW_FORM_sec_offset - - Attribute: DW_AT_data_member_location - Form: DW_FORM_exprloc - - Attribute: DW_AT_vtable_elem_location - Form: DW_FORM_sec_offset - - Attribute: DW_AT_call_data_location - Form: DW_FORM_sec_offset + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_location + Form: DW_FORM_sec_offset + - Attribute: DW_AT_data_member_location + Form: DW_FORM_exprloc + - Attribute: DW_AT_vtable_elem_location + Form: DW_FORM_sec_offset + - Attribute: DW_AT_call_data_location + Form: DW_FORM_sec_offset debug_info: - - Length: 0 - Version: 5 - UnitType: DW_UT_compile - AbbrOffset: 0 - AddrSize: 4 + - Length: 0 + Version: 5 + UnitType: DW_UT_compile + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 4 Entries: - AbbrCode: 0x00000001 Values: diff --git a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp --- a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp +++ b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp @@ -1414,33 +1414,35 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 52 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 52 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1493,33 +1495,35 @@ - /tmp/main.c - main debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 debug_info: - - Length: 44 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 44 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1576,49 +1580,51 @@ - dump - this debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_structure_type - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr - - Code: 0x00000004 - Tag: DW_TAG_formal_parameter - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_type - Form: DW_FORM_ref4 - - Attribute: DW_AT_artificial - Form: DW_FORM_flag_present + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_structure_type + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr + - Code: 0x00000004 + Tag: DW_TAG_formal_parameter + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_type + Form: DW_FORM_ref4 + - Attribute: DW_AT_artificial + Form: DW_FORM_flag_present debug_info: - - Length: 68 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 68 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1696,33 +1702,35 @@ - dead_stripped - dead_stripped2 debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 debug_info: - - Length: 78 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 78 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -1793,49 +1801,51 @@ - main - inline1 debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_inlined_subroutine - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_call_file - Form: DW_FORM_data4 - - Attribute: DW_AT_call_line - Form: DW_FORM_data4 + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_inlined_subroutine + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_call_file + Form: DW_FORM_data4 + - Attribute: DW_AT_call_line + Form: DW_FORM_data4 debug_info: - - Length: 74 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 74 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2048,49 +2058,51 @@ - no_lines_no_decl - no_lines_with_decl debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Attribute: DW_AT_stmt_list - Form: DW_FORM_sec_offset - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_decl_file - Form: DW_FORM_data1 - - Attribute: DW_AT_decl_line - Form: DW_FORM_data1 + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Attribute: DW_AT_stmt_list + Form: DW_FORM_sec_offset + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_decl_file + Form: DW_FORM_data1 + - Attribute: DW_AT_decl_line + Form: DW_FORM_data1 debug_info: - - Length: 103 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 103 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: @@ -2303,43 +2315,45 @@ - stripped2 - stripped3 debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 75 - Version: 4 - AbbrOffset: 0 - AddrSize: 4 + - Length: 75 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 4 Entries: - AbbrCode: 0x00000001 Values: @@ -2445,43 +2459,45 @@ - stripped2 - stripped3 debug_abbrev: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_yes - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Attribute: DW_AT_language - Form: DW_FORM_data2 - - Code: 0x00000002 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_data4 - - Code: 0x00000003 - Tag: DW_TAG_subprogram - Children: DW_CHILDREN_no - Attributes: - - Attribute: DW_AT_name - Form: DW_FORM_strp - - Attribute: DW_AT_low_pc - Form: DW_FORM_addr - - Attribute: DW_AT_high_pc - Form: DW_FORM_addr + - Table: + - Code: 0x00000001 + Tag: DW_TAG_compile_unit + Children: DW_CHILDREN_yes + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Attribute: DW_AT_language + Form: DW_FORM_data2 + - Code: 0x00000002 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_data4 + - Code: 0x00000003 + Tag: DW_TAG_subprogram + Children: DW_CHILDREN_no + Attributes: + - Attribute: DW_AT_name + Form: DW_FORM_strp + - Attribute: DW_AT_low_pc + Form: DW_FORM_addr + - Attribute: DW_AT_high_pc + Form: DW_FORM_addr debug_info: - - Length: 103 - Version: 4 - AbbrOffset: 0 - AddrSize: 8 + - Length: 103 + Version: 4 + AbbrevTableIndex: 1 + AbbrOffset: 0 + AddrSize: 8 Entries: - AbbrCode: 0x00000001 Values: