1 # RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \
2 # RUN: | not llvm-dwarfdump -verify - \
5 # CHECK: Verifying .debug_info Unit Header Chain...
6 # CHECK-NEXT: error: Units[1] - start offset: 0x0000000d
7 # CHECK-NEXT: note: The unit type encoding is not valid.
8 # CHECK-NEXT: note: The address size is unsupported.
9 # CHECK-NEXT: error: Units[2] - start offset: 0x00000026
10 # CHECK-NEXT: note: The 16 bit unit header version is not valid.
11 # CHECK-NEXT: note: The offset into the .debug_abbrev section is not valid.
12 # CHECK-NEXT: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
13 # CHECK-NEXT: error: Compilation unit type (DW_UT_compile) and root DIE (DW_TAG_null) do not match.
14 # CHECK-NEXT: error: Units[4] - start offset: 0x00000041
15 # CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
17 .section __TEXT,__text,regular,pure_instructions
21 .section __DWARF,__debug_str,regular,debug
23 .asciz "clang version 5.0.0 (trunk 307232) (llvm/trunk 307042)" ## string offset=0
24 .asciz "basic.c" ## string offset=55
25 .asciz "/Users/sgravani/Development/tests" ## string offset=63
26 .asciz "i" ## string offset=97
27 .asciz "int" ## string offset=99
28 .asciz "j" ## string offset=103
29 .section __DWARF,__debug_abbrev,regular,debug
31 .byte 1 ## Abbreviation Code
32 .byte 17 ## DW_TAG_compile_unit
36 .section __DWARF,__debug_info,regular,debug
39 .long 9 ## Length of Unit
40 .short 4 ## DWARF version number
41 Lset0
= Lsection_abbrev-Lsection_abbrev
## Offset Into Abbrev. Section
43 .byte 4 ## Address Size (in bytes)
44 .byte 1 ## Abbrev [1] 0xc:0x45 DW_TAG_compile_unit
45 .byte 0 ## End Of Children Mark
47 .long 21 ## Length of Unit
48 .short 5 ## DWARF version number
49 .byte 0 ## DWARF Unit Type -- Error: The unit type encoding is not valid.
50 .byte 3 ## Address Size (in bytes) -- Error: The address size is unsupported.
56 .long 10 ## Length of Unit
57 .short 6 ## DWARF version number -- Error: The 16 bit unit header version is not valid.
58 .byte 1 ## DWARF Unit Type
59 .byte 4 ## Address Size (in bytes) -- The offset into the .debug_abbrev section is not valid.
60 .long Lline_table_start0
61 .byte 1 ## Abbrev [1] 0xc:0x45 DW_TAG_compile_unit
62 .byte 0 ## End Of Children Mark
64 .long 9 ## Length of Unit
65 .short 5 ## DWARF version number
66 .byte 1 ## DWARF Unit Type
67 .byte 4 ## Address Size (in bytes)
68 .long 0 ## Abbrev offset
71 .long 26 ## Length of Unit -- Error: The length for this unit is too large for the .debug_info provided.
72 .short 5 ## DWARF version number
73 .byte 2 ## DWARF Unit Type
74 .byte 4 ## Address Size (in bytes)
80 .subsections_via_symbols
81 .section __DWARF,__debug_line,regular,debug