1 # RUN: llvm-mc -triple x86_64-pc-linux %s -o %t.o -filetype=obj
2 # RUN: llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
6 # Assembly generated from this source:
7 # struct t1 { int i; };
9 # and compiled with -g -fdebug-types-section
11 # This demonstrates that llvm-dwarfdump --verify does not try to apply offsets found in the .debug_type
15 .file 1 "/usr/local/google/home/blaikie/dev/scratch" "test.cpp"
16 .section .debug_types,"G",@progbits,14297044602779165170,comdat
17 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
19 .short 4 # DWARF version number
20 .long .debug_abbrev # Offset Into Abbrev. Section
21 .byte 8 # Address Size (in bytes)
22 .quad -4149699470930386446 # Type Signature
23 .long 30 # Type DIE Offset
24 .byte 1 # Abbrev [1] 0x17:0x25 DW_TAG_type_unit
25 .short 33 # DW_AT_language
26 .long .Lline_table_start0 # DW_AT_stmt_list
27 .byte 2 # Abbrev [2] 0x1e:0x16 DW_TAG_structure_type
28 .byte 5 # DW_AT_calling_convention
29 .long .Linfo_string6 # DW_AT_name
30 .byte 4 # DW_AT_byte_size
31 .byte 1 # DW_AT_decl_file
32 .byte 1 # DW_AT_decl_line
33 .byte 3 # Abbrev [3] 0x27:0xc DW_TAG_member
34 .long .Linfo_string4 # DW_AT_name
36 .byte 1 # DW_AT_decl_file
37 .byte 1 # DW_AT_decl_line
38 .byte 0 # DW_AT_data_member_location
39 .byte 0 # End Of Children Mark
40 .byte 4 # Abbrev [4] 0x34:0x7 DW_TAG_base_type
41 .long .Linfo_string5 # DW_AT_name
42 .byte 5 # DW_AT_encoding
43 .byte 4 # DW_AT_byte_size
44 .byte 0 # End Of Children Mark
46 .type v1,@object # @v1
54 .section .debug_abbrev,"",@progbits
55 .byte 1 # Abbreviation Code
56 .byte 65 # DW_TAG_type_unit
57 .byte 1 # DW_CHILDREN_yes
58 .byte 19 # DW_AT_language
59 .byte 5 # DW_FORM_data2
60 .byte 16 # DW_AT_stmt_list
61 .byte 23 # DW_FORM_sec_offset
64 .byte 2 # Abbreviation Code
65 .byte 19 # DW_TAG_structure_type
66 .byte 1 # DW_CHILDREN_yes
67 .byte 54 # DW_AT_calling_convention
68 .byte 11 # DW_FORM_data1
70 .byte 14 # DW_FORM_strp
71 .byte 11 # DW_AT_byte_size
72 .byte 11 # DW_FORM_data1
73 .byte 58 # DW_AT_decl_file
74 .byte 11 # DW_FORM_data1
75 .byte 59 # DW_AT_decl_line
76 .byte 11 # DW_FORM_data1
79 .byte 3 # Abbreviation Code
80 .byte 13 # DW_TAG_member
81 .byte 0 # DW_CHILDREN_no
83 .byte 14 # DW_FORM_strp
85 .byte 19 # DW_FORM_ref4
86 .byte 58 # DW_AT_decl_file
87 .byte 11 # DW_FORM_data1
88 .byte 59 # DW_AT_decl_line
89 .byte 11 # DW_FORM_data1
90 .byte 56 # DW_AT_data_member_location
91 .byte 11 # DW_FORM_data1
94 .byte 4 # Abbreviation Code
95 .byte 36 # DW_TAG_base_type
96 .byte 0 # DW_CHILDREN_no
98 .byte 14 # DW_FORM_strp
99 .byte 62 # DW_AT_encoding
100 .byte 11 # DW_FORM_data1
101 .byte 11 # DW_AT_byte_size
102 .byte 11 # DW_FORM_data1
105 .byte 5 # Abbreviation Code
106 .byte 17 # DW_TAG_compile_unit
107 .byte 1 # DW_CHILDREN_yes
108 .byte 37 # DW_AT_producer
109 .byte 14 # DW_FORM_strp
110 .byte 19 # DW_AT_language
111 .byte 5 # DW_FORM_data2
113 .byte 14 # DW_FORM_strp
114 .byte 16 # DW_AT_stmt_list
115 .byte 23 # DW_FORM_sec_offset
116 .byte 27 # DW_AT_comp_dir
117 .byte 14 # DW_FORM_strp
120 .byte 6 # Abbreviation Code
121 .byte 52 # DW_TAG_variable
122 .byte 0 # DW_CHILDREN_no
124 .byte 14 # DW_FORM_strp
125 .byte 73 # DW_AT_type
126 .byte 19 # DW_FORM_ref4
127 .byte 63 # DW_AT_external
128 .byte 25 # DW_FORM_flag_present
129 .byte 58 # DW_AT_decl_file
130 .byte 11 # DW_FORM_data1
131 .byte 59 # DW_AT_decl_line
132 .byte 11 # DW_FORM_data1
133 .byte 2 # DW_AT_location
134 .byte 24 # DW_FORM_exprloc
137 .byte 7 # Abbreviation Code
138 .byte 19 # DW_TAG_structure_type
139 .byte 0 # DW_CHILDREN_no
140 .byte 60 # DW_AT_declaration
141 .byte 25 # DW_FORM_flag_present
142 .byte 105 # DW_AT_signature
143 .byte 32 # DW_FORM_ref_sig8
147 .section .debug_info,"",@progbits
149 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
151 .short 4 # DWARF version number
152 .long .debug_abbrev # Offset Into Abbrev. Section
153 .byte 8 # Address Size (in bytes)
154 .byte 5 # Abbrev [5] 0xb:0x32 DW_TAG_compile_unit
155 .long .Linfo_string0 # DW_AT_producer
156 .short 33 # DW_AT_language
157 .long .Linfo_string1 # DW_AT_name
158 .long .Lline_table_start0 # DW_AT_stmt_list
159 .long .Linfo_string2 # DW_AT_comp_dir
160 .byte 6 # Abbrev [6] 0x1e:0x15 DW_TAG_variable
161 .long .Linfo_string3 # DW_AT_name
162 .long 51 # DW_AT_type
164 .byte 1 # DW_AT_decl_file
165 .byte 2 # DW_AT_decl_line
166 .byte 9 # DW_AT_location
169 .byte 7 # Abbrev [7] 0x33:0x9 DW_TAG_structure_type
171 .quad -4149699470930386446 # DW_AT_signature
172 .byte 0 # End Of Children Mark
174 .section .debug_str,"MS",@progbits,1
176 .asciz "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 7f00c7ce4b186ab8ba2ae66c82efdcf908c61019)" # string offset=0
178 .asciz "test.cpp" # string offset=101
180 .asciz "/usr/local/google/home/blaikie/dev/scratch" # string offset=110
182 .asciz "v1" # string offset=153
184 .asciz "i" # string offset=156
186 .asciz "int" # string offset=158
188 .asciz "t1" # string offset=162
189 .ident "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 7f00c7ce4b186ab8ba2ae66c82efdcf908c61019)"
190 .section ".note.GNU-stack","",@progbits
192 .section .debug_line,"",@progbits