Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-dwp / X86 / debug_macro_v5.s
blobe55429480486c3429a637906dcb81bebbeb4ed25
1 # This test checks the support for writing macro sections and their index (v5).
3 # RUN: llvm-mc -triple x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo -dwarf-version=5 %s -o %t.o
4 # RUN: llvm-dwp %t.dwo -o %t.dwp 2>&1
5 # RUN: llvm-dwarfdump -debug-macro -debug-cu-index %t.dwp | FileCheck -check-prefix=CHECK %s
6 # RUN: llvm-dwarfdump -debug-macro -debug-cu-index -manaully-generate-unit-index %t.dwp | FileCheck -check-prefix=CHECK2 %s
8 # CHECK-DAG: .debug_macro.dwo contents:
9 # CHECK: macro header: version = 0x0005, flags = 0x00, format = DWARF32
10 # CHECK-NEXT: DW_MACRO_start_file - lineno: 0 filenum: 0
11 # CHECK-NEXT: DW_MACRO_define_strx - lineno: 1 macro: x 5
12 # CHECK-NEXT: DW_MACRO_end_file
14 # CHECK-DAG: .debug_cu_index contents:
15 # CHECK-NEXT: version = 5, units = 1, slots = 2
16 # CHECK: Index Signature INFO ABBREV STR_OFFSETS MACRO
17 # CHECK: 1 0x0000000000000000 [0x0000000000000000, 0x0000000000000019) [0x00000000, 0x00000008) [0x00000000, 0x0000000c) [0x00000000, 0x0000000b)
19 # CHECK2: Index Signature INFO ABBREV STR_OFFSETS MACRO
20 # CHECK2: 1 0x0000000000000000 [0x0000000000000000, 0x0000000000000019) [0x00000000, 0x00000008) [0x00000000, 0x0000000c) [0x00000000, 0x0000000b)
22 .section .debug_info.dwo,"e",@progbits
23 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
24 .Ldebug_info_dwo_start0:
25 .short 5 # DWARF version number
26 .byte 5 # DWARF Unit Type (DW_UT_split_compile)
27 .byte 8 # Address Size (in bytes)
28 .long 0 # Offset Into Abbrev. Section
29 .quad 0
30 .byte 1 # Abbrev [1] 0x14:0x5 DW_TAG_compile_unit
31 .long 0 # DW_AT_macros
32 .Ldebug_info_dwo_end0:
33 .section .debug_macro.dwo,"e",@progbits
34 .short 5 # Macro information version
35 .byte 0 # Flags: 32 bit
36 .byte 3 # DW_MACRO_start_file
37 .byte 0 # Line Number
38 .byte 0 # File Number
39 .byte 11 # DW_MACRO_define_strx
40 .byte 1 # Line Number
41 .byte 0 # Macro String
42 .byte 4 # DW_MACRO_end_file
43 .byte 0 # End Of Macro List Mark
44 .section .debug_abbrev.dwo,"e",@progbits
45 .byte 1 # Abbreviation Code
46 .byte 17 # DW_TAG_compile_unit
47 .byte 0 # DW_CHILDREN_no
48 .byte 121 # DW_AT_macros
49 .byte 23 # DW_FORM_sec_offset
50 .byte 0 # EOM(1)
51 .byte 0 # EOM(2)
52 .byte 0 # EOM(3)
53 .section .debug_str.dwo,"eMS",@progbits,1
54 .asciz "x 5" # string offset=0
55 .section .debug_str_offsets.dwo,"e",@progbits
56 .long 8 # Length of String Offsets Set
57 .short 5
58 .short 0
59 .long 0