Skip to content

Commit 90f8414

Browse files
committed
added test file
1 parent a53da27 commit 90f8414

File tree

1 file changed

+242
-0
lines changed

1 file changed

+242
-0
lines changed
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
# RUN: llvm-mc %s --split-dwarf-file=test.dwo -filetype obj -triple x86_64 -o test.o
2+
# RUN: llvm-dwp -e test.o -o test.dwp
3+
# RUN: llvm-dwarfdump test.dwp | FileCheck %s
4+
5+
# Generated from:
6+
#
7+
# struct t1 { };
8+
# t1 v1;
9+
#
10+
# $ clang++ -S -g -fdebug-types-section -gsplit-dwarf -o test.4.split.dwp.s -gdwarf-4
11+
12+
# CHECK: DW_TAG_variable
13+
# CHECK: DW_AT_type ({{.*}} "t1")
14+
.file "test.cpp"
15+
.section .debug_types.dwo,"e",@progbits
16+
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
17+
.Ldebug_info_dwo_start0:
18+
.short 4 # DWARF version number
19+
.long 0 # Offset Into Abbrev. Section
20+
.byte 8 # Address Size (in bytes)
21+
.quad -4149699470930386446 # Type Signature
22+
.long 30 # Type DIE Offset
23+
.byte 1 # Abbrev [1] 0x17:0xe DW_TAG_type_unit
24+
.short 33 # DW_AT_language
25+
.long 0 # DW_AT_stmt_list
26+
.byte 2 # Abbrev [2] 0x1e:0x6 DW_TAG_structure_type
27+
.byte 5 # DW_AT_calling_convention
28+
.byte 1 # DW_AT_name
29+
.byte 1 # DW_AT_byte_size
30+
.byte 1 # DW_AT_decl_file
31+
.byte 1 # DW_AT_decl_line
32+
.byte 0 # End Of Children Mark
33+
.Ldebug_info_dwo_end0:
34+
.file 1 "." "test.cpp"
35+
.type v1,@object # @v1
36+
.bss
37+
.globl v1
38+
v1:
39+
.zero 1
40+
.size v1, 1
41+
42+
.section .debug_abbrev,"",@progbits
43+
.byte 1 # Abbreviation Code
44+
.byte 17 # DW_TAG_compile_unit
45+
.byte 0 # DW_CHILDREN_no
46+
.byte 16 # DW_AT_stmt_list
47+
.byte 23 # DW_FORM_sec_offset
48+
.byte 27 # DW_AT_comp_dir
49+
.byte 14 # DW_FORM_strp
50+
.ascii "\264B" # DW_AT_GNU_pubnames
51+
.byte 25 # DW_FORM_flag_present
52+
.ascii "\260B" # DW_AT_GNU_dwo_name
53+
.byte 14 # DW_FORM_strp
54+
.ascii "\261B" # DW_AT_GNU_dwo_id
55+
.byte 7 # DW_FORM_data8
56+
.ascii "\263B" # DW_AT_GNU_addr_base
57+
.byte 23 # DW_FORM_sec_offset
58+
.byte 0 # EOM(1)
59+
.byte 0 # EOM(2)
60+
.byte 0 # EOM(3)
61+
.section .debug_info,"",@progbits
62+
.Lcu_begin0:
63+
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
64+
.Ldebug_info_start0:
65+
.short 4 # DWARF version number
66+
.long .debug_abbrev # Offset Into Abbrev. Section
67+
.byte 8 # Address Size (in bytes)
68+
.byte 1 # Abbrev [1] 0xb:0x19 DW_TAG_compile_unit
69+
.long .Lline_table_start0 # DW_AT_stmt_list
70+
.long .Lskel_string0 # DW_AT_comp_dir
71+
# DW_AT_GNU_pubnames
72+
.long .Lskel_string1 # DW_AT_GNU_dwo_name
73+
.quad 1388839634901268525 # DW_AT_GNU_dwo_id
74+
.long .Laddr_table_base0 # DW_AT_GNU_addr_base
75+
.Ldebug_info_end0:
76+
.section .debug_str,"MS",@progbits,1
77+
.Lskel_string0:
78+
.asciz "." # string offset=0
79+
.Lskel_string1:
80+
.asciz "test.dwo" # string offset=2
81+
.section .debug_str.dwo,"eMS",@progbits,1
82+
.Linfo_string0:
83+
.asciz "v1" # string offset=0
84+
.Linfo_string1:
85+
.asciz "t1" # string offset=3
86+
.Linfo_string2:
87+
.asciz "clang version 22.0.0" # string offset=6
88+
.Linfo_string3:
89+
.asciz "test.cpp" # string offset=27
90+
.Linfo_string4:
91+
.asciz "test.dwo" # string offset=36
92+
.section .debug_str_offsets.dwo,"e",@progbits
93+
.long 0
94+
.long 3
95+
.long 6
96+
.long 27
97+
.long 36
98+
.section .debug_info.dwo,"e",@progbits
99+
.long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
100+
.Ldebug_info_dwo_start1:
101+
.short 4 # DWARF version number
102+
.long 0 # Offset Into Abbrev. Section
103+
.byte 8 # Address Size (in bytes)
104+
.byte 3 # Abbrev [3] 0xb:0x23 DW_TAG_compile_unit
105+
.byte 2 # DW_AT_producer
106+
.short 33 # DW_AT_language
107+
.byte 3 # DW_AT_name
108+
.byte 4 # DW_AT_GNU_dwo_name
109+
.quad 1388839634901268525 # DW_AT_GNU_dwo_id
110+
.byte 4 # Abbrev [4] 0x19:0xb DW_TAG_variable
111+
.byte 0 # DW_AT_name
112+
.long 36 # DW_AT_type
113+
# DW_AT_external
114+
.byte 1 # DW_AT_decl_file
115+
.byte 2 # DW_AT_decl_line
116+
.byte 2 # DW_AT_location
117+
.byte 251
118+
.byte 0
119+
.byte 5 # Abbrev [5] 0x24:0x9 DW_TAG_structure_type
120+
# DW_AT_declaration
121+
.quad -4149699470930386446 # DW_AT_signature
122+
.byte 0 # End Of Children Mark
123+
.Ldebug_info_dwo_end1:
124+
.section .debug_abbrev.dwo,"e",@progbits
125+
.byte 1 # Abbreviation Code
126+
.byte 65 # DW_TAG_type_unit
127+
.byte 1 # DW_CHILDREN_yes
128+
.byte 19 # DW_AT_language
129+
.byte 5 # DW_FORM_data2
130+
.byte 16 # DW_AT_stmt_list
131+
.byte 23 # DW_FORM_sec_offset
132+
.byte 0 # EOM(1)
133+
.byte 0 # EOM(2)
134+
.byte 2 # Abbreviation Code
135+
.byte 19 # DW_TAG_structure_type
136+
.byte 0 # DW_CHILDREN_no
137+
.byte 54 # DW_AT_calling_convention
138+
.byte 11 # DW_FORM_data1
139+
.byte 3 # DW_AT_name
140+
.ascii "\202>" # DW_FORM_GNU_str_index
141+
.byte 11 # DW_AT_byte_size
142+
.byte 11 # DW_FORM_data1
143+
.byte 58 # DW_AT_decl_file
144+
.byte 11 # DW_FORM_data1
145+
.byte 59 # DW_AT_decl_line
146+
.byte 11 # DW_FORM_data1
147+
.byte 0 # EOM(1)
148+
.byte 0 # EOM(2)
149+
.byte 3 # Abbreviation Code
150+
.byte 17 # DW_TAG_compile_unit
151+
.byte 1 # DW_CHILDREN_yes
152+
.byte 37 # DW_AT_producer
153+
.ascii "\202>" # DW_FORM_GNU_str_index
154+
.byte 19 # DW_AT_language
155+
.byte 5 # DW_FORM_data2
156+
.byte 3 # DW_AT_name
157+
.ascii "\202>" # DW_FORM_GNU_str_index
158+
.ascii "\260B" # DW_AT_GNU_dwo_name
159+
.ascii "\202>" # DW_FORM_GNU_str_index
160+
.ascii "\261B" # DW_AT_GNU_dwo_id
161+
.byte 7 # DW_FORM_data8
162+
.byte 0 # EOM(1)
163+
.byte 0 # EOM(2)
164+
.byte 4 # Abbreviation Code
165+
.byte 52 # DW_TAG_variable
166+
.byte 0 # DW_CHILDREN_no
167+
.byte 3 # DW_AT_name
168+
.ascii "\202>" # DW_FORM_GNU_str_index
169+
.byte 73 # DW_AT_type
170+
.byte 19 # DW_FORM_ref4
171+
.byte 63 # DW_AT_external
172+
.byte 25 # DW_FORM_flag_present
173+
.byte 58 # DW_AT_decl_file
174+
.byte 11 # DW_FORM_data1
175+
.byte 59 # DW_AT_decl_line
176+
.byte 11 # DW_FORM_data1
177+
.byte 2 # DW_AT_location
178+
.byte 24 # DW_FORM_exprloc
179+
.byte 0 # EOM(1)
180+
.byte 0 # EOM(2)
181+
.byte 5 # Abbreviation Code
182+
.byte 19 # DW_TAG_structure_type
183+
.byte 0 # DW_CHILDREN_no
184+
.byte 60 # DW_AT_declaration
185+
.byte 25 # DW_FORM_flag_present
186+
.byte 105 # DW_AT_signature
187+
.byte 32 # DW_FORM_ref_sig8
188+
.byte 0 # EOM(1)
189+
.byte 0 # EOM(2)
190+
.byte 0 # EOM(3)
191+
.section .debug_line.dwo,"e",@progbits
192+
.Ltmp0:
193+
.long .Ldebug_line_end0-.Ldebug_line_start0 # unit length
194+
.Ldebug_line_start0:
195+
.short 4
196+
.long .Lprologue_end0-.Lprologue_start0
197+
.Lprologue_start0:
198+
.byte 1
199+
.byte 1
200+
.byte 1
201+
.byte -5
202+
.byte 14
203+
.byte 1
204+
.byte 0
205+
.ascii "test.cpp"
206+
.byte 0
207+
.byte 0
208+
.byte 0
209+
.byte 0
210+
.byte 0
211+
.Lprologue_end0:
212+
.Ldebug_line_end0:
213+
.section .debug_addr,"",@progbits
214+
.Laddr_table_base0:
215+
.quad v1
216+
.section .debug_gnu_pubnames,"",@progbits
217+
.long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
218+
.LpubNames_start0:
219+
.short 2 # DWARF Version
220+
.long .Lcu_begin0 # Offset of Compilation Unit Info
221+
.long 36 # Compilation Unit Length
222+
.long 25 # DIE offset
223+
.byte 32 # Attributes: VARIABLE, EXTERNAL
224+
.asciz "v1" # External Name
225+
.long 0 # End Mark
226+
.LpubNames_end0:
227+
.section .debug_gnu_pubtypes,"",@progbits
228+
.long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
229+
.LpubTypes_start0:
230+
.short 2 # DWARF Version
231+
.long .Lcu_begin0 # Offset of Compilation Unit Info
232+
.long 36 # Compilation Unit Length
233+
.long 36 # DIE offset
234+
.byte 16 # Attributes: TYPE, EXTERNAL
235+
.asciz "t1" # External Name
236+
.long 0 # End Mark
237+
.LpubTypes_end0:
238+
.ident "clang version 22.0.0"
239+
.section ".note.GNU-stack","",@progbits
240+
.addrsig
241+
.section .debug_line,"",@progbits
242+
.Lline_table_start0:

0 commit comments

Comments
 (0)