1 ## Test that DWARFv5 DW_FORM_line_strp and corresponding .debug_line_str
2 ## table are correctly recognized and copied into the result.
4 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil %t.o %t1
7 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
8 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
10 # RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
11 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
12 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
14 # RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %t.o %t1
15 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
16 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
18 # RUN: llvm-dwarfutil --linker llvm %t.o %t1
19 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
20 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
22 # RUN: llvm-dwarfutil --linker llvm --no-garbage-collection %t.o %t1
23 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
24 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
26 # RUN: llvm-dwarfutil --linker llvm --no-garbage-collection --build-accelerator=DWARF %t.o %t1
27 # RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
28 # RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
30 #VERIFY-CHECK: No errors.
33 #CHECK: DW_TAG_compile_unit
34 #CHECK: DW_TAG_subprogram
35 #CHECK: DW_AT_name [DW_FORM_line_strp] ( .debug_line_str[0x00000000] = "foo1")
37 #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_str
55 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
58 - Name: .debug_line_str
65 Content: "2a00000005000801220000000102030405050102030401011f02000000000000000001011f020000000000000000"
69 - Tag: DW_TAG_compile_unit
70 Children: DW_CHILDREN_yes
72 - Attribute: DW_AT_producer
74 - Attribute: DW_AT_language
76 - Attribute: DW_AT_name
78 - Attribute: DW_AT_low_pc
80 - Attribute: DW_AT_high_pc
82 - Attribute: DW_AT_addr_base
83 Form: DW_FORM_sec_offset
84 - Attribute: DW_AT_stmt_list
85 Form: DW_FORM_sec_offset
86 - Tag: DW_TAG_subprogram
87 Children: DW_CHILDREN_yes
89 - Attribute: DW_AT_name
90 Form: DW_FORM_line_strp
91 - Attribute: DW_AT_low_pc
93 - Attribute: DW_AT_high_pc
95 - Attribute: DW_AT_type
97 - Tag: DW_TAG_base_type
98 Children: DW_CHILDREN_no
100 - Attribute: DW_AT_name
102 - Tag: DW_TAG_variable
103 Children: DW_CHILDREN_no
105 - Attribute: DW_AT_name
107 - Attribute: DW_AT_const_value
108 Form: DW_FORM_implicit_const
110 - Attribute: DW_AT_type
114 UnitType: DW_UT_compile