Debian Codegraph @

llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-cu-lists-json-output.s

raw
1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2 # RUN: not llvm-dwarfdump -verify -verify-json=%t.json -
3 # RUN: FileCheck %s --input-file %t.json
4
5 # CHECK: {"error-categories":{"Duplicate Name Index":{"count":1,"details":{}},"Name Index doesn't index any CU":{"count":1,"details":{}},"Name Index references non-existing CU":{"count":1,"details":{}}},"error-count":3}
6 # CHECK-NOT : error: Name Index @ 0x58 references a CU @ 0x0, but this CU is already indexed by Name Index @ 0x28
7 # CHECK-NOT: warning: CU @ 0x13 not covered by any Name Index
8
9
10 .section .debug_str,"MS",@progbits,1
11 .Lstring_foo:
12 .asciz "foo"
13 .Lstring_foo_mangled:
14 .asciz "_Z3foov"
15 .Lstring_bar:
16 .asciz "bar"
17 .Lstring_producer:
18 .asciz "Hand-written dwarf"
19
20 .section .debug_abbrev,"",@progbits
21 .Lsection_abbrev:
22 .byte 1 # Abbreviation Code
23 .byte 17 # DW_TAG_compile_unit
24 .byte 1 # DW_CHILDREN_yes
25 .byte 37 # DW_AT_producer
26 .byte 14 # DW_FORM_strp
27 .byte 19 # DW_AT_language
28 .byte 5 # DW_FORM_data2
29 .byte 0 # EOM(1)
30 .byte 0 # EOM(2)
31 .byte 0 # EOM(3)
32
33 .section .debug_info,"",@progbits
34 .Lcu_begin0:
35 .long .Lcu_end0-.Lcu_start0 # Length of Unit
36 .Lcu_start0:
37 .short 4 # DWARF version number
38 .long .Lsection_abbrev # Offset Into Abbrev. Section
39 .byte 8 # Address Size (in bytes)
40 .byte 1 # Abbrev [1] DW_TAG_compile_unit
41 .long .Lstring_producer # DW_AT_producer
42 .short 12 # DW_AT_language
43 .byte 0 # End Of Children Mark
44 .Lcu_end0:
45
46 .Lcu_begin1:
47 .long .Lcu_end1-.Lcu_start1 # Length of Unit
48 .Lcu_start1:
49 .short 4 # DWARF version number
50 .long .Lsection_abbrev # Offset Into Abbrev. Section
51 .byte 8 # Address Size (in bytes)
52 .byte 1 # Abbrev [1] DW_TAG_compile_unit
53 .long .Lstring_producer # DW_AT_producer
54 .short 12 # DW_AT_language
55 .byte 0 # End Of Children Mark
56 .Lcu_end1:
57
58 .section .debug_names,"",@progbits
59 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
60 .Lnames_start0:
61 .short 5 # Header: version
62 .short 0 # Header: padding
63 .long 0 # Header: compilation unit count
64 .long 0 # Header: local type unit count
65 .long 0 # Header: foreign type unit count
66 .long 0 # Header: bucket count
67 .long 0 # Header: name count
68 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
69 .long 0 # Header: augmentation length
70 .Lnames_abbrev_start0:
71 .byte 0 # End of abbrev list
72 .Lnames_abbrev_end0:
73 .p2align 2
74 .Lnames_end0:
75
76 .long .Lnames_end1-.Lnames_start1 # Header: contribution length
77 .Lnames_start1:
78 .short 5 # Header: version
79 .short 0 # Header: padding
80 .long 2 # Header: compilation unit count
81 .long 0 # Header: local type unit count
82 .long 0 # Header: foreign type unit count
83 .long 0 # Header: bucket count
84 .long 0 # Header: name count
85 .long .Lnames_abbrev_end1-.Lnames_abbrev_start1 # Header: abbreviation table size
86 .long 0 # Header: augmentation length
87 .long .Lcu_begin0 # Compilation unit 0
88 .long .Lcu_begin0+1 # Compilation unit 0
89 .Lnames_abbrev_start1:
90 .byte 0 # End of abbrev list
91 .Lnames_abbrev_end1:
92 .p2align 2
93 .Lnames_end1:
94
95 .long .Lnames_end2-.Lnames_start2 # Header: contribution length
96 .Lnames_start2:
97 .short 5 # Header: version
98 .short 0 # Header: padding
99 .long 1 # Header: compilation unit count
100 .long 0 # Header: local type unit count
101 .long 0 # Header: foreign type unit count
102 .long 0 # Header: bucket count
103 .long 0 # Header: name count
104 .long .Lnames_abbrev_end2-.Lnames_abbrev_start2 # Header: abbreviation table size
105 .long 0 # Header: augmentation length
106 .long .Lcu_begin0 # Compilation unit 0
107 .Lnames_abbrev_start2:
108 .byte 0 # End of abbrev list
109 .Lnames_abbrev_end2:
110 .p2align 2
111 .Lnames_end2: