[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / verify_debug_info.s
blob1536c455208b7053142a558a245573563e41e593
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \
2 # RUN: | not llvm-dwarfdump -v -verify - \
3 # RUN: | FileCheck %s
5 # CHECK: error: DIE has invalid DW_AT_stmt_list encoding:{{[[:space:]]}}
6 # CHECK-NEXT: 0x0000000c: DW_TAG_compile_unit [1] *
7 # CHECK-NEXT: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "clang version 5.0.0 (trunk 308185) (llvm/trunk 308186)")
8 # CHECK-NEXT: DW_AT_language [DW_FORM_data2] (DW_LANG_C99)
9 # CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000037] = "basic.c")
10 # CHECK-NEXT: DW_AT_stmt_list [DW_FORM_block4]
11 # CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000003f] = "/Users/sgravani/Development/tests")
12 # CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
13 # CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000016){{[[:space:]]}}
14 # CHECK-NEXT: error: DIE has DW_AT_decl_file that references a file with index 1 and the compile unit has no line table{{[[:space:]]}}
15 # CHECK-NEXT: 0x0000002b: DW_TAG_subprogram [2] *
16 # CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
17 # CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000016)
18 # CHECK-NEXT: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6)
19 # CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000061] = "main")
20 # CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] (0x01)
21 # CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (1)
22 # CHECK-NEXT: DW_AT_prototyped [DW_FORM_flag_present] (true)
23 # CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0052 => {0x00000052} "")
24 # CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true){{[[:space:]]}}
25 # CHECK-NEXT: error: DIE has DW_AT_type with incompatible tag DW_TAG_null{{[[:space:]]}}
26 # CHECK-NEXT: 0x0000002b: DW_TAG_subprogram [2] *
27 # CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
28 # CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000016)
29 # CHECK-NEXT: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6)
30 # CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000061] = "main")
31 # CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] (0x01)
32 # CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (1)
33 # CHECK-NEXT: DW_AT_prototyped [DW_FORM_flag_present] (true)
34 # CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0052 => {0x00000052} "")
35 # CHECK-NEXT: DW_AT_external [DW_FORM_flag_present] (true){{[[:space:]]}}
36 # CHECK-NEXT: error: DIE has DW_AT_decl_file that references a file with index 1 and the compile unit has no line table{{[[:space:]]}}
37 # CHECK-NEXT: 0x00000044: DW_TAG_variable [3]
38 # CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg -8)
39 # CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006a] = "a")
40 # CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] (0x01)
41 # CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] (2)
42 # CHECK-NEXT: DW_AT_use_location [DW_FORM_ref4] (cu + 0x0053 => {0x00000053}){{[[:space:]]}}
43 # CHECK-NEXT: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
44 # CHECK-NEXT: error: Compilation unit type (DW_UT_compile) and root DIE (DW_TAG_null) do not match.
45 # CHECK-NEXT: error: Units[2] - start offset: 0x00000068
46 # CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
47 # CHECK-NEXT: note: The unit type encoding is not valid.
50 .section __TEXT,__text,regular,pure_instructions
51 .globl _main ## -- Begin function main
52 .p2align 4, 0x90
53 _main: ## @main
54 Lfunc_begin0:
55 .file 1 "basic.c"
56 .loc 1 1 0 ## basic.c:1:0
57 .cfi_startproc
58 ## %bb.0: ## %entry
59 pushq %rbp
60 .cfi_def_cfa_offset 16
61 .cfi_offset %rbp, -16
62 movq %rsp, %rbp
63 .cfi_def_cfa_register %rbp
64 xorl %eax, %eax
65 movl $0, -4(%rbp)
66 Ltmp0:
67 .loc 1 2 7 prologue_end ## basic.c:2:7
68 movl $1, -8(%rbp)
69 .loc 1 3 3 ## basic.c:3:3
70 popq %rbp
71 retq
72 Ltmp1:
73 Lfunc_end0:
74 .cfi_endproc
75 ## -- End function
76 .section __DWARF,__debug_str,regular,debug
77 Linfo_string:
78 .asciz "clang version 5.0.0 (trunk 308185) (llvm/trunk 308186)" ## string offset=0
79 .asciz "basic.c" ## string offset=55
80 .asciz "/Users/sgravani/Development/tests" ## string offset=63
81 .asciz "main" ## string offset=97
82 .asciz "int" ## string offset=102
83 .asciz "a" ## string offset=106
84 .section __DWARF,__debug_abbrev,regular,debug
85 Lsection_abbrev:
86 .byte 1 ## Abbreviation Code
87 .byte 17 ## DW_TAG_compile_unit
88 .byte 1 ## DW_CHILDREN_yes
89 .byte 37 ## DW_AT_producer
90 .byte 14 ## DW_FORM_strp
91 .byte 19 ## DW_AT_language
92 .byte 5 ## DW_FORM_data2
93 .byte 3 ## DW_AT_name
94 .byte 14 ## DW_FORM_strp
95 .byte 16 ## DW_AT_stmt_list
96 .byte 4 ## DW_FORM_sec_offset -- error: DIE has invalid DW_AT_stmt_list encoding:
97 .byte 27 ## DW_AT_comp_dir
98 .byte 14 ## DW_FORM_strp
99 .byte 17 ## DW_AT_low_pc
100 .byte 1 ## DW_FORM_addr
101 .byte 18 ## DW_AT_high_pc
102 .byte 6 ## DW_FORM_data4
103 .byte 0 ## EOM(1)
104 .byte 0 ## EOM(2)
105 .byte 2 ## Abbreviation Code
106 .byte 46 ## DW_TAG_subprogram
107 .byte 1 ## DW_CHILDREN_yes
108 .byte 17 ## DW_AT_low_pc
109 .byte 1 ## DW_FORM_addr
110 .byte 18 ## DW_AT_high_pc
111 .byte 6 ## DW_FORM_data4
112 .byte 64 ## DW_AT_frame_base
113 .byte 24 ## DW_FORM_exprloc
114 .byte 3 ## DW_AT_name
115 .byte 14 ## DW_FORM_strp
116 .byte 58 ## DW_AT_decl_file
117 .byte 11 ## DW_FORM_data1
118 .byte 59 ## DW_AT_decl_line
119 .byte 11 ## DW_FORM_data1
120 .byte 39 ## DW_AT_prototyped
121 .byte 25 ## DW_FORM_flag_present
122 .byte 73 ## DW_AT_type
123 .byte 19 ## DW_FORM_ref4
124 .byte 63 ## DW_AT_external
125 .byte 25 ## DW_FORM_flag_present
126 .byte 0 ## EOM(1)
127 .byte 0 ## EOM(2)
128 .byte 3 ## Abbreviation Code
129 .byte 52 ## DW_TAG_variable
130 .byte 0 ## DW_CHILDREN_no
131 .byte 2 ## DW_AT_location
132 .byte 24 ## DW_FORM_exprloc
133 .byte 3 ## DW_AT_name
134 .byte 14 ## DW_FORM_strp
135 .byte 58 ## DW_AT_decl_file
136 .byte 11 ## DW_FORM_data1
137 .byte 59 ## DW_AT_decl_line
138 .byte 11 ## DW_FORM_data1
139 .byte 74 ## DW_AT_type
140 .byte 19 ## DW_FORM_ref4
141 .byte 0 ## EOM(1)
142 .byte 0 ## EOM(2)
143 .byte 4 ## Abbreviation Code
144 .byte 36 ## DW_TAG_base_type
145 .byte 0 ## DW_CHILDREN_no
146 .byte 3 ## DW_AT_name
147 .byte 14 ## DW_FORM_strp
148 .byte 62 ## DW_AT_encoding
149 .byte 11 ## DW_FORM_data1
150 .byte 11 ## DW_AT_byte_size
151 .byte 11 ## DW_FORM_data1
152 .byte 0 ## EOM(1)
153 .byte 0 ## EOM(2)
154 .byte 0 ## EOM(3)
155 .section __DWARF,__debug_info,regular,debug
156 Lsection_info:
157 Lcu_begin0:
158 .long 87 ## Length of Unit
159 .short 5 ## DWARF version number
160 .byte 1 ## DWARF Unit Type
161 .byte 8 ## Address Size (in bytes)
162 Lset0 = Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
163 .long Lset0
164 .byte 1 ## Abbrev [1] 0xc:0x4f DW_TAG_compile_unit
165 .long 0 ## DW_AT_producer
166 .short 12 ## DW_AT_language
167 .long 55 ## DW_AT_name
168 Lset1 = Lline_table_start0-Lsection_line ## DW_AT_stmt_list
169 .long Lset1
170 .long 63 ## DW_AT_comp_dir
171 .quad Lfunc_begin0 ## DW_AT_low_pc
172 Lset2 = Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
173 .long Lset2
174 .byte 2 ## Abbrev [2] 0x2b:0x28 DW_TAG_subprogram
175 .quad Lfunc_begin0 ## DW_AT_low_pc
176 Lset3 = Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
177 .long Lset3
178 .byte 1 ## DW_AT_frame_base
179 .byte 86
180 .long 97 ## DW_AT_name
181 .byte 1 ## DW_AT_decl_file
182 .byte 1 ## DW_AT_decl_line
183 ## DW_AT_prototyped
184 .long 82 ## DW_AT_type
185 ## DW_AT_external
186 .byte 3 ## Abbrev [3] 0x44:0xe DW_TAG_variable
187 .byte 2 ## DW_AT_location
188 .byte 145
189 .byte 120
190 .long 106 ## DW_AT_name
191 .byte 1 ## DW_AT_decl_file
192 .byte 2 ## DW_AT_decl_line
193 .long 83 ## DW_AT_type
194 .byte 0 ## End Of Children Mark
195 .byte 4 ## Abbrev [4] 0x53:0x7 DW_TAG_base_type
196 .long 102 ## DW_AT_name
197 .byte 5 ## DW_AT_encoding
198 .byte 4 ## DW_AT_byte_size
199 .byte 0 ## End Of Children Mark
200 Lcu_begin1:
201 .long 9 ## Length of Unit
202 .short 5 ## DWARF version number
203 .byte 1 ## DWARF Unit Type
204 .byte 4 ## Address Size (in bytes)
205 .long 0 ## Abbrev offset
206 .byte 0
207 Ltu_begin0:
208 .long 26 ## Length of Unit -- Error: The length for this unit is too large for the .debug_info provided.
209 .short 5 ## DWARF version number
210 .byte 0 ## DWARF Unit Type
211 .byte 4 ## Address Size (in bytes)
212 .long 0
213 .quad 0
214 .long 0
215 .byte 0
217 .subsections_via_symbols
218 .section __DWARF,__debug_line,regular,debug
219 Lsection_line:
220 Lline_table_start0: