1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2 # RUN: not llvm-dwarfdump -verify - | FileCheck %s
4 # CHECK: error: Name Index @ 0x0 does not index any CU
5 # CHECK: error: Name Index @ 0x28 references a non-existing CU @ 0x1
6 # CHECK: error: Name Index @ 0x58 references a CU @ 0x0, but this CU is already indexed by Name Index @ 0x28
7 # CHECK: warning: CU @ 0x13 not covered by any Name Index
9 .section .debug_str,"MS",@progbits,1
17 .asciz "Hand-written dwarf"
19 .section .debug_abbrev,"",@progbits
21 .byte 1 # Abbreviation Code
22 .byte 17 # DW_TAG_compile_unit
23 .byte 1 # DW_CHILDREN_yes
24 .byte 37 # DW_AT_producer
25 .byte 14 # DW_FORM_strp
26 .byte 19 # DW_AT_language
27 .byte 5 # DW_FORM_data2
32 .section .debug_info,"",@progbits
34 .long .Lcu_end0-.Lcu_start0 # Length of Unit
36 .short 4 # DWARF version number
37 .long .Lsection_abbrev # Offset Into Abbrev. Section
38 .byte 8 # Address Size (in bytes)
39 .byte 1 # Abbrev [1] DW_TAG_compile_unit
40 .long .Lstring_producer # DW_AT_producer
41 .short 12 # DW_AT_language
42 .byte 0 # End Of Children Mark
46 .long .Lcu_end1-.Lcu_start1 # Length of Unit
48 .short 4 # DWARF version number
49 .long .Lsection_abbrev # Offset Into Abbrev. Section
50 .byte 8 # Address Size (in bytes)
51 .byte 1 # Abbrev [1] DW_TAG_compile_unit
52 .long .Lstring_producer # DW_AT_producer
53 .short 12 # DW_AT_language
54 .byte 0 # End Of Children Mark
57 .section .debug_names,"",@progbits
58 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
60 .short 5 # Header: version
61 .short 0 # Header: padding
62 .long 0 # Header: compilation unit count
63 .long 0 # Header: local type unit count
64 .long 0 # Header: foreign type unit count
65 .long 0 # Header: bucket count
66 .long 0 # Header: name count
67 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
68 .long 0 # Header: augmentation length
69 .Lnames_abbrev_start0:
70 .byte 0 # End of abbrev list
75 .long .Lnames_end1-.Lnames_start1 # Header: contribution length
77 .short 5 # Header: version
78 .short 0 # Header: padding
79 .long 2 # Header: compilation unit count
80 .long 0 # Header: local type unit count
81 .long 0 # Header: foreign type unit count
82 .long 0 # Header: bucket count
83 .long 0 # Header: name count
84 .long .Lnames_abbrev_end1-.Lnames_abbrev_start1 # Header: abbreviation table size
85 .long 0 # Header: augmentation length
86 .long .Lcu_begin0 # Compilation unit 0
87 .long .Lcu_begin0+1 # Compilation unit 0
88 .Lnames_abbrev_start1:
89 .byte 0 # End of abbrev list
94 .long .Lnames_end2-.Lnames_start2 # Header: contribution length
96 .short 5 # Header: version
97 .short 0 # Header: padding
98 .long 1 # Header: compilation unit count
99 .long 0 # Header: local type unit count
100 .long 0 # Header: foreign type unit count
101 .long 0 # Header: bucket count
102 .long 0 # Header: name count
103 .long .Lnames_abbrev_end2-.Lnames_abbrev_start2 # Header: abbreviation table size
104 .long 0 # Header: augmentation length
105 .long .Lcu_begin0 # Compilation unit 0
106 .Lnames_abbrev_start2:
107 .byte 0 # End of abbrev list