| 1 |
# RUN: yaml2obj %s | llvm-dwarfdump --statistics - | FileCheck %s |
| 2 |
|
| 3 |
## Check that zero coverage was reported for inlined variable with |
| 4 |
## DW_AT_abstract_origin with no location attribute as well as |
| 5 |
## for the variable that has not been generated within the inlined subroutine. |
| 6 |
## |
| 7 |
## The yaml represents DWARF as: |
| 8 |
## |
| 9 |
## DW_TAG_compile_unit |
| 10 |
## DW_AT_low_pc (0x0000000000000000) |
| 11 |
## DW_TAG_subprogram <-- (0x00000014) |
| 12 |
## DW_AT_decl_file (0x01) |
| 13 |
## DW_AT_decl_line (1) |
| 14 |
## DW_AT_inline (DW_INL_inlined) |
| 15 |
## DW_TAG_formal_parameter <-- (0x00000018) |
| 16 |
## DW_AT_decl_file (0x01) |
| 17 |
## DW_AT_decl_line (1) |
| 18 |
## DW_TAG_formal_parameter <-- (0x0000001b) |
| 19 |
## DW_AT_decl_file (0x01) |
| 20 |
## DW_AT_decl_line (1) |
| 21 |
## DW_TAG_variable <-- (0x0000001e) |
| 22 |
## DW_AT_decl_file (0x01) |
| 23 |
## DW_AT_decl_line (1) |
| 24 |
## DW_TAG_subprogram |
| 25 |
## DW_AT_decl_file (0x01) |
| 26 |
## DW_AT_decl_line (1) |
| 27 |
## DW_AT_low_pc (0x0000000000000000) |
| 28 |
## DW_AT_high_pc (0x000000000000000b) |
| 29 |
## DW_TAG_inlined_subroutine |
| 30 |
## DW_AT_abstract_origin (0x00000014) |
| 31 |
## DW_AT_low_pc (0x0000000000000000) |
| 32 |
## DW_AT_high_pc (0x0000000000000007) |
| 33 |
## DW_AT_call_file (0x01) |
| 34 |
## DW_AT_call_line (1) |
| 35 |
## DW_AT_call_column (1) |
| 36 |
## DW_TAG_formal_parameter |
| 37 |
## DW_AT_abstract_origin (0x00000018) |
| 38 |
## DW_TAG_variable |
| 39 |
## DW_AT_abstract_origin (0x0000001e) |
| 40 |
## DW_AT_location () |
| 41 |
## DW_TAG_inlined_subroutine |
| 42 |
## DW_AT_abstract_origin (0x00000014) |
| 43 |
## DW_AT_low_pc (0x0000000000000000) |
| 44 |
## DW_AT_high_pc (0x0000000000000007) |
| 45 |
## DW_AT_call_file (0x01) |
| 46 |
## DW_AT_call_line (1) |
| 47 |
## DW_AT_call_column (1) |
| 48 |
## DW_TAG_formal_parameter |
| 49 |
## DW_AT_abstract_origin (0x00000018) |
| 50 |
## DW_AT_location () |
| 51 |
## DW_TAG_variable |
| 52 |
## DW_AT_abstract_origin (0x0000001e) |
| 53 |
## DW_AT_location () |
| 54 |
## DW_TAG_inlined_subroutine |
| 55 |
## DW_AT_abstract_origin (0x00000014) |
| 56 |
## DW_AT_low_pc (0x0000000000000000) |
| 57 |
## DW_AT_high_pc (0x0000000000000007) |
| 58 |
## DW_AT_call_file (0x01) |
| 59 |
## DW_AT_call_line (1) |
| 60 |
## DW_AT_call_column (1) |
| 61 |
## DW_TAG_inlined_subroutine |
| 62 |
## DW_AT_abstract_origin (0x00000014) |
| 63 |
## DW_AT_low_pc (0x0000000000000002) |
| 64 |
## DW_AT_high_pc (0x000000000000000a) |
| 65 |
## DW_AT_call_file (0x01) |
| 66 |
## DW_AT_call_line (3) |
| 67 |
## DW_AT_call_column (3) |
| 68 |
## DW_TAG_inlined_subroutine |
| 69 |
## DW_AT_abstract_origin (0x000000e5) |
| 70 |
## DW_AT_low_pc (0x0000000000000006) |
| 71 |
## DW_AT_high_pc (0x0000000000000010) |
| 72 |
## DW_AT_call_file (0x01) |
| 73 |
## DW_AT_call_line (3) |
| 74 |
## DW_AT_call_column (3) |
| 75 |
## DW_TAG_inlined_subroutine |
| 76 |
## DW_AT_abstract_origin (0x000000e5) |
| 77 |
## DW_AT_low_pc (0x0000000000000006) |
| 78 |
## DW_AT_high_pc (0x0000000000000010) |
| 79 |
## DW_AT_call_file (0x01) |
| 80 |
## DW_AT_call_line (3) |
| 81 |
## DW_AT_call_column (3) |
| 82 |
## DW_TAG_formal_parameter |
| 83 |
## DW_AT_abstract_origin (0x000000e9) |
| 84 |
## DW_AT_location () |
| 85 |
## DW_TAG_inlined_subroutine |
| 86 |
## DW_AT_abstract_origin (0x000000f0) |
| 87 |
## DW_AT_low_pc (0x0000000000000010) |
| 88 |
## DW_AT_high_pc (0x000000000000001a) |
| 89 |
## DW_AT_call_file (0x01) |
| 90 |
## DW_AT_call_line (3) |
| 91 |
## DW_AT_call_column (3) |
| 92 |
## DW_TAG_formal_parameter |
| 93 |
## DW_AT_abstract_origin (0x000000f4) |
| 94 |
## DW_TAG_lexical_block |
| 95 |
## DW_AT_low_pc (0x00000000000000bc) |
| 96 |
## DW_AT_high_pc (0x00000000000000bc) |
| 97 |
## DW_TAG_variable |
| 98 |
## DW_AT_abstract_origin (0x000000f8) |
| 99 |
## DW_TAG_subprogram <-- (0x000000e5) |
| 100 |
## DW_AT_decl_file (0x01) |
| 101 |
## DW_AT_decl_line (3) |
| 102 |
## DW_AT_inline (DW_INL_inlined) |
| 103 |
## DW_TAG_formal_parameter <-- (0x000000e9) |
| 104 |
## DW_AT_decl_file (0x01) |
| 105 |
## DW_AT_decl_line (1) |
| 106 |
## DW_TAG_variable <-- (0x000000be) |
| 107 |
## DW_AT_decl_file (0x01) |
| 108 |
## DW_AT_decl_line (1) |
| 109 |
## DW_TAG_subprogram <-- (0x000000f0) |
| 110 |
## DW_AT_decl_file (0x01) |
| 111 |
## DW_AT_decl_line (3) |
| 112 |
## DW_AT_inline (DW_INL_inlined) |
| 113 |
## DW_TAG_formal_parameter <--(0x000000f4) |
| 114 |
## DW_AT_decl_file (0x01) |
| 115 |
## DW_AT_decl_line (1) |
| 116 |
## DW_TAG_lexical_block |
| 117 |
## DW_TAG_variable <--(0x000000f8) |
| 118 |
## DW_AT_decl_file (0x01) |
| 119 |
## DW_AT_decl_line (1) |
| 120 |
## DW_TAG_subprogram |
| 121 |
## DW_AT_abstract_origin (0x000000f0) |
| 122 |
|
| 123 |
# CHECK: "version": 9, |
| 124 |
# CHECK: "#variables processed by location statistics": 17, |
| 125 |
# CHECK: "#variables with 0% of parent scope covered by DW_AT_location": 13, |
| 126 |
# CHECK: "#variables with 100% of parent scope covered by DW_AT_location": 4, |
| 127 |
|
| 128 |
--- !ELF |
| 129 |
FileHeader: |
| 130 |
Class: ELFCLASS64 |
| 131 |
Data: ELFDATA2LSB |
| 132 |
Type: ET_EXEC |
| 133 |
Machine: EM_X86_64 |
| 134 |
DWARF: |
| 135 |
debug_abbrev: |
| 136 |
- Table: |
| 137 |
- Code: 1 |
| 138 |
Tag: DW_TAG_compile_unit |
| 139 |
Children: DW_CHILDREN_yes |
| 140 |
Attributes: |
| 141 |
- Attribute: DW_AT_low_pc |
| 142 |
Form: DW_FORM_addr |
| 143 |
- Code: 2 |
| 144 |
Tag: DW_TAG_subprogram |
| 145 |
Children: DW_CHILDREN_yes |
| 146 |
Attributes: |
| 147 |
- Attribute: DW_AT_decl_file |
| 148 |
Form: DW_FORM_data1 |
| 149 |
- Attribute: DW_AT_decl_line |
| 150 |
Form: DW_FORM_data1 |
| 151 |
- Attribute: DW_AT_inline |
| 152 |
Form: DW_FORM_data1 |
| 153 |
- Code: 3 |
| 154 |
Tag: DW_TAG_formal_parameter |
| 155 |
Children: DW_CHILDREN_no |
| 156 |
Attributes: |
| 157 |
- Attribute: DW_AT_decl_file |
| 158 |
Form: DW_FORM_data1 |
| 159 |
- Attribute: DW_AT_decl_line |
| 160 |
Form: DW_FORM_data1 |
| 161 |
- Code: 4 |
| 162 |
Tag: DW_TAG_formal_parameter |
| 163 |
Children: DW_CHILDREN_no |
| 164 |
Attributes: |
| 165 |
- Attribute: DW_AT_decl_file |
| 166 |
Form: DW_FORM_data1 |
| 167 |
- Attribute: DW_AT_decl_line |
| 168 |
Form: DW_FORM_data1 |
| 169 |
- Code: 5 |
| 170 |
Tag: DW_TAG_variable |
| 171 |
Children: DW_CHILDREN_no |
| 172 |
Attributes: |
| 173 |
- Attribute: DW_AT_decl_file |
| 174 |
Form: DW_FORM_data1 |
| 175 |
- Attribute: DW_AT_decl_line |
| 176 |
Form: DW_FORM_data1 |
| 177 |
- Code: 6 |
| 178 |
Tag: DW_TAG_subprogram |
| 179 |
Children: DW_CHILDREN_yes |
| 180 |
Attributes: |
| 181 |
- Attribute: DW_AT_decl_file |
| 182 |
Form: DW_FORM_data1 |
| 183 |
- Attribute: DW_AT_decl_line |
| 184 |
Form: DW_FORM_data1 |
| 185 |
- Attribute: DW_AT_low_pc |
| 186 |
Form: DW_FORM_addr |
| 187 |
- Attribute: DW_AT_high_pc |
| 188 |
Form: DW_FORM_data4 |
| 189 |
- Code: 7 |
| 190 |
Tag: DW_TAG_inlined_subroutine |
| 191 |
Children: DW_CHILDREN_yes |
| 192 |
Attributes: |
| 193 |
- Attribute: DW_AT_abstract_origin |
| 194 |
Form: DW_FORM_ref4 |
| 195 |
- Attribute: DW_AT_low_pc |
| 196 |
Form: DW_FORM_addr |
| 197 |
- Attribute: DW_AT_high_pc |
| 198 |
Form: DW_FORM_data4 |
| 199 |
- Attribute: DW_AT_call_file |
| 200 |
Form: DW_FORM_data1 |
| 201 |
- Attribute: DW_AT_call_line |
| 202 |
Form: DW_FORM_data1 |
| 203 |
- Attribute: DW_AT_call_column |
| 204 |
Form: DW_FORM_data1 |
| 205 |
- Code: 8 |
| 206 |
Tag: DW_TAG_formal_parameter |
| 207 |
Children: DW_CHILDREN_no |
| 208 |
Attributes: |
| 209 |
- Attribute: DW_AT_abstract_origin |
| 210 |
Form: DW_FORM_ref4 |
| 211 |
- Code: 9 |
| 212 |
Tag: DW_TAG_variable |
| 213 |
Children: DW_CHILDREN_no |
| 214 |
Attributes: |
| 215 |
- Attribute: DW_AT_abstract_origin |
| 216 |
Form: DW_FORM_ref4 |
| 217 |
- Attribute: DW_AT_location |
| 218 |
Form: DW_FORM_exprloc |
| 219 |
- Code: 10 |
| 220 |
Tag: DW_TAG_formal_parameter |
| 221 |
Children: DW_CHILDREN_no |
| 222 |
Attributes: |
| 223 |
- Attribute: DW_AT_abstract_origin |
| 224 |
Form: DW_FORM_ref4 |
| 225 |
- Attribute: DW_AT_location |
| 226 |
Form: DW_FORM_exprloc |
| 227 |
- Code: 11 |
| 228 |
Tag: DW_TAG_subprogram |
| 229 |
Children: DW_CHILDREN_yes |
| 230 |
Attributes: |
| 231 |
- Attribute: DW_AT_decl_file |
| 232 |
Form: DW_FORM_data1 |
| 233 |
- Attribute: DW_AT_decl_line |
| 234 |
Form: DW_FORM_data1 |
| 235 |
- Attribute: DW_AT_inline |
| 236 |
Form: DW_FORM_data1 |
| 237 |
- Code: 12 |
| 238 |
Tag: DW_TAG_formal_parameter |
| 239 |
Children: DW_CHILDREN_no |
| 240 |
Attributes: |
| 241 |
- Attribute: DW_AT_decl_file |
| 242 |
Form: DW_FORM_data1 |
| 243 |
- Attribute: DW_AT_decl_line |
| 244 |
Form: DW_FORM_data1 |
| 245 |
- Code: 13 |
| 246 |
Tag: DW_TAG_lexical_block |
| 247 |
Children: DW_CHILDREN_yes |
| 248 |
- Code: 14 |
| 249 |
Tag: DW_TAG_lexical_block |
| 250 |
Children: DW_CHILDREN_yes |
| 251 |
Attributes: |
| 252 |
- Attribute: DW_AT_low_pc |
| 253 |
Form: DW_FORM_addr |
| 254 |
- Attribute: DW_AT_high_pc |
| 255 |
Form: DW_FORM_data4 |
| 256 |
- Code: 15 |
| 257 |
Tag: DW_TAG_formal_parameter |
| 258 |
Children: DW_CHILDREN_no |
| 259 |
Attributes: |
| 260 |
- Attribute: DW_AT_abstract_origin |
| 261 |
Form: DW_FORM_ref4 |
| 262 |
- Code: 16 |
| 263 |
Tag: DW_TAG_variable |
| 264 |
Children: DW_CHILDREN_no |
| 265 |
Attributes: |
| 266 |
- Attribute: DW_AT_abstract_origin |
| 267 |
Form: DW_FORM_ref4 |
| 268 |
- Code: 17 |
| 269 |
Tag: DW_TAG_subprogram |
| 270 |
Children: DW_CHILDREN_no |
| 271 |
Attributes: |
| 272 |
- Attribute: DW_AT_abstract_origin |
| 273 |
Form: DW_FORM_ref4 |
| 274 |
debug_info: |
| 275 |
- Version: 4 |
| 276 |
AbbrOffset: 0x00 |
| 277 |
Entries: |
| 278 |
- AbbrCode: 1 ## DW_TAG_compile_unit |
| 279 |
Values: |
| 280 |
- Value: 0x00 ## DW_AT_producer |
| 281 |
- AbbrCode: 2 ## DW_TAG_subprogram |
| 282 |
Values: |
| 283 |
- Value: 1 ## DW_AT_decl_file |
| 284 |
- Value: 1 ## DW_AT_decl_line |
| 285 |
- Value: 1 ## DW_AT_inline |
| 286 |
- AbbrCode: 3 ## DW_TAG_formal_parameter |
| 287 |
Values: |
| 288 |
- Value: 1 ## DW_AT_decl_file |
| 289 |
- Value: 1 ## DW_AT_decl_line |
| 290 |
- AbbrCode: 4 ## DW_TAG_formal_parameter |
| 291 |
Values: |
| 292 |
- Value: 1 ## DW_AT_decl_file |
| 293 |
- Value: 1 ## DW_AT_decl_line |
| 294 |
- AbbrCode: 5 ## DW_TAG_variable |
| 295 |
Values: |
| 296 |
- Value: 1 ## DW_AT_decl_file |
| 297 |
- Value: 1 ## DW_AT_decl_line |
| 298 |
- AbbrCode: 0 ## NULL |
| 299 |
- AbbrCode: 6 ## DW_TAG_subprogram |
| 300 |
Values: |
| 301 |
- Value: 1 ## DW_AT_decl_file |
| 302 |
- Value: 1 ## DW_AT_decl_line |
| 303 |
- Value: 0x00 ## DW_AT_low_pc |
| 304 |
- Value: 0x0b ## DW_AT_high_pc |
| 305 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 306 |
Values: |
| 307 |
- Value: 0x14 ## DW_AT_abstract_origin |
| 308 |
- Value: 0x00 ## DW_AT_low_pc |
| 309 |
- Value: 0x07 ## DW_AT_high_pc |
| 310 |
- Value: 1 ## DW_AT_call_file |
| 311 |
- Value: 1 ## DW_AT_call_line |
| 312 |
- Value: 1 ## DW_AT_call_column |
| 313 |
- AbbrCode: 8 ## DW_TAG_formal_parameter |
| 314 |
Values: |
| 315 |
- Value: 0x18 ## DW_AT_abstract_origin |
| 316 |
- AbbrCode: 9 ## DW_TAG_formal_parameter |
| 317 |
Values: |
| 318 |
- Value: 0x1e ## DW_AT_abstract_origin |
| 319 |
- Value: 0x0 ## DW_AT_location |
| 320 |
- AbbrCode: 0 ## NULL |
| 321 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 322 |
Values: |
| 323 |
- Value: 0x14 ## DW_AT_abstract_origin |
| 324 |
- Value: 0x02 ## DW_AT_low_pc |
| 325 |
- Value: 0x08 ## DW_AT_high_pc |
| 326 |
- Value: 1 ## DW_AT_call_file |
| 327 |
- Value: 2 ## DW_AT_call_line |
| 328 |
- Value: 2 ## DW_AT_call_column |
| 329 |
- AbbrCode: 10 ## DW_TAG_formal_parameter |
| 330 |
Values: |
| 331 |
- Value: 0x18 ## DW_AT_abstract_origin |
| 332 |
- Value: 0x0 ## DW_AT_location |
| 333 |
- AbbrCode: 9 ## DW_TAG_variable |
| 334 |
Values: |
| 335 |
- Value: 0x1e ## DW_AT_abstract_origin |
| 336 |
- Value: 0x0 ## DW_AT_location |
| 337 |
- AbbrCode: 0 ## NULL |
| 338 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 339 |
Values: |
| 340 |
- Value: 0x14 ## DW_AT_abstract_origin |
| 341 |
- Value: 0x02 ## DW_AT_low_pc |
| 342 |
- Value: 0x08 ## DW_AT_high_pc |
| 343 |
- Value: 1 ## DW_AT_call_file |
| 344 |
- Value: 3 ## DW_AT_call_line |
| 345 |
- Value: 3 ## DW_AT_call_column |
| 346 |
- AbbrCode: 0 ## NULL |
| 347 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 348 |
Values: |
| 349 |
- Value: 0xe5 ## DW_AT_abstract_origin |
| 350 |
- Value: 0x06 ## DW_AT_low_pc |
| 351 |
- Value: 0x0a ## DW_AT_high_pc |
| 352 |
- Value: 1 ## DW_AT_call_file |
| 353 |
- Value: 3 ## DW_AT_call_line |
| 354 |
- Value: 3 ## DW_AT_call_column |
| 355 |
- AbbrCode: 0 ## NULL |
| 356 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 357 |
Values: |
| 358 |
- Value: 0xe5 ## DW_AT_abstract_origin |
| 359 |
- Value: 0x06 ## DW_AT_low_pc |
| 360 |
- Value: 0x0a ## DW_AT_high_pc |
| 361 |
- Value: 1 ## DW_AT_call_file |
| 362 |
- Value: 3 ## DW_AT_call_line |
| 363 |
- Value: 3 ## DW_AT_call_column |
| 364 |
- AbbrCode: 10 ## DW_TAG_formal_parameter |
| 365 |
Values: |
| 366 |
- Value: 0xe9 ## DW_AT_abstract_origin |
| 367 |
- Value: 0x0 ## DW_AT_location |
| 368 |
- AbbrCode: 0 ## NULL |
| 369 |
- AbbrCode: 7 ## DW_TAG_inlined_subroutine |
| 370 |
Values: |
| 371 |
- Value: 0xf0 ## DW_AT_abstract_origin |
| 372 |
- Value: 0x10 ## DW_AT_low_pc |
| 373 |
- Value: 0x0a ## DW_AT_high_pc |
| 374 |
- Value: 1 ## DW_AT_call_file |
| 375 |
- Value: 3 ## DW_AT_call_line |
| 376 |
- Value: 3 ## DW_AT_call_column |
| 377 |
- AbbrCode: 15 ## DW_TAG_formal_parameter |
| 378 |
Values: |
| 379 |
- Value: 0xf4 ## DW_AT_abstract_origin |
| 380 |
- AbbrCode: 14 ## DW_TAG_lexical_block |
| 381 |
Values: |
| 382 |
- Value: 0xbc ## DW_AT_low_pc |
| 383 |
- Value: 0x0 ## DW_AT_high_pc |
| 384 |
- AbbrCode: 16 ## DW_TAG_variable |
| 385 |
Values: |
| 386 |
- Value: 0xf8 ## DW_AT_abstract_origin |
| 387 |
- AbbrCode: 0 ## NULL |
| 388 |
- AbbrCode: 0 ## NULL |
| 389 |
- AbbrCode: 0 ## NULL |
| 390 |
- AbbrCode: 2 ## DW_TAG_subprogram |
| 391 |
Values: |
| 392 |
- Value: 1 ## DW_AT_decl_file |
| 393 |
- Value: 3 ## DW_AT_decl_line |
| 394 |
- Value: 1 ## DW_AT_inline |
| 395 |
- AbbrCode: 3 ## DW_TAG_formal_parameter |
| 396 |
Values: |
| 397 |
- Value: 1 ## DW_AT_decl_file |
| 398 |
- Value: 1 ## DW_AT_decl_line |
| 399 |
- AbbrCode: 5 ## DW_TAG_variable |
| 400 |
Values: |
| 401 |
- Value: 1 ## DW_AT_decl_file |
| 402 |
- Value: 1 ## DW_AT_decl_line |
| 403 |
- AbbrCode: 0 ## NULL |
| 404 |
- AbbrCode: 11 ## DW_TAG_subprogram |
| 405 |
Values: |
| 406 |
- Value: 1 ## DW_AT_decl_file |
| 407 |
- Value: 3 ## DW_AT_decl_line |
| 408 |
- Value: 1 ## DW_AT_inline |
| 409 |
- AbbrCode: 3 ## DW_TAG_formal_parameter |
| 410 |
Values: |
| 411 |
- Value: 1 ## DW_AT_decl_file |
| 412 |
- Value: 1 ## DW_AT_decl_line |
| 413 |
- AbbrCode: 13 ## DW_TAG_lexical_block |
| 414 |
- AbbrCode: 5 ## DW_TAG_variable |
| 415 |
Values: |
| 416 |
- Value: 1 ## DW_AT_decl_file |
| 417 |
- Value: 1 ## DW_AT_decl_line |
| 418 |
- AbbrCode: 0 ## NULL |
| 419 |
- AbbrCode: 0 ## NULL |
| 420 |
- AbbrCode: 17 ## DW_TAG_subprogram |
| 421 |
Values: |
| 422 |
- Value: 0xf0 ## DW_AT_abstract_origin |
| 423 |
- AbbrCode: 0 ## NULL |