1 # RUN: llvm-mc %s -filetype obj -triple x86_64-linux-gnu -o - \
2 # RUN: | not llvm-dwarfdump -v -verify - 2>&1 \
3 # RUN: | FileCheck %s --implicit-check-not=error --implicit-check-not=warning
5 # CHECK: Verifying dwo Units...
6 # CHECK: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
7 # CHECK: error: Compilation unit type (DW_UT_split_compile) and root DIE (DW_TAG_null) do not match.
8 # CHECK: error: Unsupported DW_AT_location encoding: DW_FORM_data1
9 # FIXME: This should read "type unit" or just "unit" to be correct for this case/in general
10 # CHECK: error: DIE has DW_AT_decl_file that references a file with index 1 and the compile unit has no line table
11 # CHECK: error: Aggregated error counts:
12 # CHECK: error: Compilation unit root DIE is not a unit DIE occurred 1 time(s).
13 # CHECK: error: File index in DW_AT_decl_file reference CU with no line table occurred 1 time(s).
14 # CHECK: error: Invalid DW_AT_location occurred 1 time(s).
15 # CHECK: error: Mismatched unit type occurred 1 time(s).
16 # CHECK: Errors detected.
17 .section .debug_info.dwo,"e",@progbits
18 .long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
19 .Ldebug_info_dwo_start1:
20 .short 5 # DWARF version number
21 .byte 5 # DWARF Unit Type
22 .byte 8 # Address Size (in bytes)
23 .long 0 # Offset Into Abbrev. Section
26 .Ldebug_info_dwo_end1:
27 .long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
28 .Ldebug_info_dwo_start2:
29 .short 5 # DWARF version number
30 .byte 5 # DWARF Unit Type
31 .byte 8 # Address Size (in bytes)
32 .long 0 # Offset Into Abbrev. Section
34 .byte 1 # Abbrev [1] DW_TAG_compile_unit
35 .byte 0 # DW_AT_decl_file
36 .byte 0 # DW_AT_location
37 .Ldebug_info_dwo_end2:
38 .Ldebug_info_dwo_prestart3:
39 .long .Ldebug_info_dwo_end3-.Ldebug_info_dwo_start3 # Length of Unit
40 .Ldebug_info_dwo_start3:
41 .short 5 # DWARF version number
42 .byte 6 # DWARF Unit Type
43 .byte 8 # Address Size (in bytes)
44 .long 0 # Offset Into Abbrev. Section
45 .quad 3 # Type Signature
46 .long .Ldebug_info_dwo_die3-.Ldebug_info_dwo_prestart3 # Type DIE Offset
47 .Ldebug_info_dwo_die3:
48 .byte 2 # Abbrev [2] DW_TAG_type_unit
49 .byte 1 # DW_AT_decl_file
50 .Ldebug_info_dwo_end3:
51 .Ldebug_info_dwo_prestart4:
52 .long .Ldebug_info_dwo_end4-.Ldebug_info_dwo_start4 # Length of Unit
53 .Ldebug_info_dwo_start4:
54 .short 5 # DWARF version number
55 .byte 6 # DWARF Unit Type
56 .byte 8 # Address Size (in bytes)
57 .long 0 # Offset Into Abbrev. Section
58 .quad 4 # Type Signature
59 .long .Ldebug_info_dwo_die4-.Ldebug_info_dwo_prestart4 # Type DIE Offset
60 .Ldebug_info_dwo_die4:
61 .byte 3 # Abbrev [3] DW_TAG_type_unit
62 .long 0 # DW_AT_stmt_list
63 .byte 0 # DW_AT_decl_file
64 .Ldebug_info_dwo_end4:
65 .long .Ldebug_info_dwo_end5-.Ldebug_info_dwo_start5 # Length of Unit
66 .Ldebug_info_dwo_start5:
67 .short 5 # DWARF version number
68 .byte 5 # DWARF Unit Type
69 .byte 8 # Address Size (in bytes)
70 .long 0 # Offset Into Abbrev. Section
72 .byte 4 # Abbrev [1] DW_TAG_compile_unit
73 .uleb128 0 # DW_AT_location
74 .Ldebug_info_dwo_end5:
75 .section .debug_abbrev.dwo,"e",@progbits
76 .byte 1 # Abbreviation Code
77 .byte 17 # DW_TAG_compile_unit
78 .byte 0 # DW_CHILDREN_no
79 .byte 58 # DW_AT_decl_file
80 .byte 11 # DW_FORM_data1
81 .byte 2 # DW_AT_location
82 .byte 11 # DW_FORM_data1
85 .byte 2 # Abbreviation Code
86 .byte 65 # DW_TAG_type_unit
87 .byte 0 # DW_CHILDREN_no
88 .byte 58 # DW_AT_decl_file
89 .byte 11 # DW_FORM_data1
92 .byte 3 # Abbreviation Code
93 .byte 65 # DW_TAG_type_unit
94 .byte 0 # DW_CHILDREN_no
95 .byte 16 # DW_AT_stmt_list
96 .byte 23 # DW_FORM_sec_offset
97 .byte 58 # DW_AT_decl_file
98 .byte 11 # DW_FORM_data1
101 .byte 4 # Abbreviation Code
102 .byte 17 # DW_TAG_compile_unit
103 .byte 0 # DW_CHILDREN_no
104 .byte 2 # DW_AT_location
105 .byte 34 # DW_FORM_loclistx
109 .section .debug_line.dwo,"e",@progbits
111 .long .Ldebug_line_end0-.Ldebug_line_start0 # unit length
116 .long .Lprologue_end0-.Lprologue_start0
128 .ascii "/usr/local/google/home/blaikie/dev/scratch"
141 .byte 0x5e, 0xc4, 0x4d, 0x3b
142 .byte 0x78, 0xd0, 0x2a, 0x57
143 .byte 0xd2, 0x75, 0xc1, 0x22
144 .byte 0x36, 0xb7, 0x17, 0xbf
147 .section .debug_loclists.dwo,"e",@progbits
148 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
149 .Ldebug_list_header_start0:
151 .byte 8 # Address size
152 .byte 0 # Segment selector size
153 .long 1 # Offset entry count
154 .Lloclists_table_base0:
155 .long .Ldebug_loc0-.Lloclists_table_base0
157 .byte 1 # DW_LLE_base_addressx
158 .byte 0 # base address index
159 .byte 4 # DW_LLE_offset_pair
160 .uleb128 0 # starting offset
161 .uleb128 1 # ending offset
162 .byte 3 # Loc expr size
163 .byte 17 # DW_OP_consts
165 .byte 159 # DW_OP_stack_value
166 .byte 0 # DW_LLE_end_of_list
167 .Ldebug_list_header_end0: