1 ## This checks that llvm-dwarfdump can parse and dump DWARF64 macro units.
3 # RUN: llvm-mc -triple x86_64 -filetype=obj %s -o - \
4 # RUN: | llvm-dwarfdump -debug-macro - \
7 # CHECK: .debug_macro contents:
10 # CHECK-NEXT: macro header: version = 0x0005, flags = 0x03, format = DWARF64, debug_line_offset = 0x0000000000000000
11 # CHECK-NEXT: DW_MACRO_start_file - lineno: 0 filenum: 0
12 # CHECK-NEXT: DW_MACRO_import - import offset: 0x00000000[[MACRO1OFF:[[:xdigit:]]{8}]]
13 # CHECK-NEXT: DW_MACRO_end_file
15 # CHECK: 0x[[MACRO1OFF]]:
16 # CHECK-NEXT: macro header: version = 0x0005, flags = 0x01, format = DWARF64
17 # CHECK-NEXT: DW_MACRO_define_strp - lineno: 1 macro: FOO 1
18 # CHECK-NEXT: DW_MACRO_undef_strp - lineno: 9 macro: BAR
19 # CHECK-NEXT: DW_MACRO_undef_strp - lineno: 15 macro: BAZ
21 .section .debug_macro, "", @progbits
24 .byte 3 # Flags: offset_size_flag | debug_line_offset_flag
25 .quad 0 # Debug Line Offset
26 .byte 3 # DW_MACRO_start_file
29 .byte 7 # DW_MACRO_import
31 .byte 4 # DW_MACRO_end_file
32 .byte 0 # End macro unit
35 .byte 1 # Flags: offset_size_flag
36 .byte 5 # DW_MACRO_define_strp
38 .quad .LStr0 # "FOO 1"
39 .byte 6 # DW_MACRO_undef_strp
42 .byte 6 # DW_MACRO_undef_strp
45 .byte 0 # End macro unit
47 .section .debug_str, "MS", @progbits, 1