1 ## This test checks llvm-dwarfdump can dump debug_macro section containing
2 ## multiple macro units.
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_start_file - lineno: 1 filenum: 6
12 # CHECK-NEXT: DW_MACRO_define_strp - lineno: 1 macro: FOO 5
13 # CHECK-NEXT: DW_MACRO_end_file
14 # CHECK-NEXT: DW_MACRO_undef_strp - lineno: 8 macro: WORLD1
15 # CHECK-NEXT: DW_MACRO_import - import offset: 0x[[OFFSET:[0-9]+]]
16 # CHECK-NEXT:DW_MACRO_end_file
19 # CHECK-NEXT:macro header: version = 0x0005, flags = 0x00, format = DWARF32
20 # CHECK-NEXT:DW_MACRO_define_strp - lineno: 0 macro: WORLD 2
22 .section .debug_macro,"",@progbits
24 .short 5 # Macro information version
25 .byte 2 # Flags: 32 bit, debug_line_offset present
26 .long 0 # debug_line_offset
27 .byte 3 # DW_MACRO_start_file
30 .byte 3 # DW_MACRO_start_file
33 .byte 5 # DW_MACRO_define_strp
35 .long .Linfo_string0 # Macro String
36 .byte 4 # DW_MACRO_end_file
37 .byte 6 # DW_MACRO_undef_strp
39 .long .Linfo_string1 # Macro String
40 .byte 7 # DW_MACRO_import
41 .long .Lmacro1 # Macro Unit Offset
42 .byte 4 # DW_MACRO_end_file
43 .byte 0 # End Of Macro List Mark
46 .short 5 # Macro information version
47 .byte 0 # Flags: 32 bit
48 .byte 5 # DW_MACRO_define_strp
50 .long .Linfo_string2 # Macro String
51 .byte 0 # End Of Macro List Mark
53 .section .debug_str,"MS",@progbits,1