142 lines · plain
1## Test that DWARFv5 DW_FORM_line_strp and corresponding .debug_line_str2## table are correctly recognized and copied into the result.3 4# RUN: yaml2obj %s -o %t.o5 6# RUN: llvm-dwarfutil %t.o %t17# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK8# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s9 10# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t111# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK12# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s13 14# RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %t.o %t115# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK16# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s17 18# RUN: llvm-dwarfutil --linker parallel %t.o %t119# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK20# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s21 22# RUN: llvm-dwarfutil --linker parallel --no-garbage-collection %t.o %t123# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK24# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s25 26# RUN: llvm-dwarfutil --linker parallel --no-garbage-collection --build-accelerator=DWARF %t.o %t127# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK28# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s29 30#VERIFY-CHECK: No errors.31 32#CHECK: .debug_info33#CHECK: DW_TAG_compile_unit34#CHECK: DW_TAG_subprogram35#CHECK: DW_AT_name [DW_FORM_line_strp] ( .debug_line_str[0x00000000] = "foo1")36#CHECK: .debug_line37#CHECK: include_directories[ 0] = .debug_line_str[0x00000000] = "foo1"38#CHECK: include_directories[ 1] = .debug_line_str[0x00000000] = "foo1"39#CHECK: file_names[ 0]:40#CHECK: name: .debug_line_str[0x00000000] = "foo1"41#CHECK: file_names[ 1]:42#CHECK: name: .debug_line_str[0x00000000] = "foo1"43#CHECK: .debug_line_str44#CHECK: "foo1"45 46--- !ELF47FileHeader:48 Class: ELFCLASS6449 Data: ELFDATA2LSB50 Type: ET_REL51 Machine: EM_X86_6452Sections:53 - Name: .text54 Type: SHT_PROGBITS55 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]56 Address: 0x113057 Size: 0x6058 - Name: .debug_line_str59 Type: SHT_PROGBITS60 Flags: [ ]61 Content: "666f6f3100"62 - Name: .debug_line63 Type: SHT_PROGBITS64 Flags: [ ]65 Content: "2a00000005000801220000000102030405050102030401011f02000000000000000001011f020000000000000000"66DWARF:67 debug_abbrev:68 - Table:69 - Tag: DW_TAG_compile_unit70 Children: DW_CHILDREN_yes71 Attributes:72 - Attribute: DW_AT_producer73 Form: DW_FORM_string74 - Attribute: DW_AT_language75 Form: DW_FORM_data276 - Attribute: DW_AT_name77 Form: DW_FORM_string78 - Attribute: DW_AT_low_pc79 Form: DW_FORM_addrx80 - Attribute: DW_AT_high_pc81 Form: DW_FORM_data882 - Attribute: DW_AT_addr_base83 Form: DW_FORM_sec_offset84 - Attribute: DW_AT_stmt_list85 Form: DW_FORM_sec_offset86 - Tag: DW_TAG_subprogram87 Children: DW_CHILDREN_yes88 Attributes:89 - Attribute: DW_AT_name90 Form: DW_FORM_line_strp91 - Attribute: DW_AT_low_pc92 Form: DW_FORM_addrx93 - Attribute: DW_AT_high_pc94 Form: DW_FORM_data895 - Attribute: DW_AT_type96 Form: DW_FORM_ref497 - Tag: DW_TAG_base_type98 Children: DW_CHILDREN_no99 Attributes:100 - Attribute: DW_AT_name101 Form: DW_FORM_string102 - Tag: DW_TAG_variable103 Children: DW_CHILDREN_no104 Attributes:105 - Attribute: DW_AT_name106 Form: DW_FORM_string107 - Attribute: DW_AT_const_value108 Form: DW_FORM_implicit_const109 Value: 33110 - Attribute: DW_AT_type111 Form: DW_FORM_ref4112 debug_info:113 - Version: 5114 UnitType: DW_UT_compile115 Entries:116 - AbbrCode: 1117 Values:118 - CStr: by_hand119 - Value: 0x04120 - CStr: CU1121 - Value: 0x0122 - Value: 0x10123 - Value: 0x8124 - Value: 0x0125 - AbbrCode: 2126 Values:127 - Value: 0x0128 - Value: 0x0129 - Value: 0x10130 - Value: 0x3f131 - AbbrCode: 0132 - AbbrCode: 3133 Values:134 - CStr: int135 - AbbrCode: 0136 debug_addr:137 - Version: 5138 AddressSize: 0x08139 Entries:140 - Address: 0x1130141...142