1 ## This test checks that llvm-dwarfdump can dump both debug_macro and debug_macinfo
2 ## sections present in the same object.
4 # RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \
5 # RUN: llvm-dwarfdump -debug-macro - | FileCheck -strict-whitespace -match-full-lines %s
7 # CHECK:.debug_macro contents:
8 # CHECK-NEXT:0x00000000:
9 # CHECK-NEXT:macro header: version = 0x0005, flags = 0x02, format = DWARF32, debug_line_offset = 0x00000000
10 # CHECK-NEXT:DW_MACRO_start_file - lineno: 0 filenum: 0
11 # CHECK-NEXT: DW_MACRO_define_strp - lineno: 1 macro: DWARF_VERSION 5
12 # CHECK-NEXT:DW_MACRO_end_file
14 # CHECK:.debug_macinfo contents:
15 # CHECK-NEXT:0x00000000:
16 # CHECK-NEXT:DW_MACINFO_start_file - lineno: 0 filenum: 2
17 # CHECK-NEXT: DW_MACINFO_define - lineno: 6 macro: DWARF_VERSION 4
18 # CHECK-NEXT:DW_MACINFO_end_file
20 .section .debug_macro,"",@progbits
22 .short 5 # Macro information version
23 .byte 2 # Flags: 32 bit, debug_line_offset present
24 .long 0 # debug_line_offset
25 .byte 3 # DW_MACRO_start_file
28 .byte 5 # DW_MACRO_define_strp
30 .long .Linfo_string0 # Macro String
31 .byte 4 # DW_MACRO_end_file
32 .byte 0 # End Of Macro List Mark
34 .section .debug_macinfo,"",@progbits
36 .byte 3 # DW_MACINFO_start_file
39 .byte 1 # DW_MACINFO_define
41 .asciz "DWARF_VERSION 4" # Macro String
42 .byte 4 # DW_MACINFO_end_file
43 .byte 0 # End Of Macro List Mark
45 .section .debug_str,"MS",@progbits,1
47 .asciz "DWARF_VERSION 5"