xref: /llvm-project/llvm/test/DebugInfo/X86/debug-macro-macinfo.s (revision ccbd7e8d463a1d40852c6acbbecd3ae1e2c38f4c)
169c8fb1cSSourabh Singh Tomar## This test checks that llvm-dwarfdump can dump both debug_macro and debug_macinfo
269c8fb1cSSourabh Singh Tomar## sections present in the same object.
369c8fb1cSSourabh Singh Tomar
469c8fb1cSSourabh Singh Tomar# RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \
569c8fb1cSSourabh Singh Tomar# RUN:   llvm-dwarfdump -debug-macro - | FileCheck -strict-whitespace -match-full-lines %s
669c8fb1cSSourabh Singh Tomar
769c8fb1cSSourabh Singh Tomar#      CHECK:.debug_macro contents:
869c8fb1cSSourabh Singh Tomar# CHECK-NEXT:0x00000000:
9*ccbd7e8dSIgor Kudrin# CHECK-NEXT:macro header: version = 0x0005, flags = 0x02, format = DWARF32, debug_line_offset = 0x00000000
1069c8fb1cSSourabh Singh Tomar# CHECK-NEXT:DW_MACRO_start_file - lineno: 0 filenum: 0
1169c8fb1cSSourabh Singh Tomar# CHECK-NEXT:  DW_MACRO_define_strp - lineno: 1 macro: DWARF_VERSION 5
1269c8fb1cSSourabh Singh Tomar# CHECK-NEXT:DW_MACRO_end_file
1369c8fb1cSSourabh Singh Tomar
1469c8fb1cSSourabh Singh Tomar#      CHECK:.debug_macinfo contents:
1569c8fb1cSSourabh Singh Tomar# CHECK-NEXT:0x00000000:
1669c8fb1cSSourabh Singh Tomar# CHECK-NEXT:DW_MACINFO_start_file - lineno: 0 filenum: 2
1769c8fb1cSSourabh Singh Tomar# CHECK-NEXT:  DW_MACINFO_define - lineno: 6 macro: DWARF_VERSION 4
1869c8fb1cSSourabh Singh Tomar# CHECK-NEXT:DW_MACINFO_end_file
1969c8fb1cSSourabh Singh Tomar
2069c8fb1cSSourabh Singh Tomar	.section	.debug_macro,"",@progbits
2169c8fb1cSSourabh Singh Tomar.Lcu_macro_begin0:
2269c8fb1cSSourabh Singh Tomar	.short	5                      # Macro information version
2369c8fb1cSSourabh Singh Tomar	.byte	2                       # Flags: 32 bit, debug_line_offset present
2469c8fb1cSSourabh Singh Tomar	.long	0                       # debug_line_offset
2569c8fb1cSSourabh Singh Tomar	.byte	3                       # DW_MACRO_start_file
2669c8fb1cSSourabh Singh Tomar	.byte	0                       # Line Number
2769c8fb1cSSourabh Singh Tomar	.byte	0                       # File Number
2869c8fb1cSSourabh Singh Tomar	.byte	5                       # DW_MACRO_define_strp
2969c8fb1cSSourabh Singh Tomar	.byte	1                       # Line Number
3069c8fb1cSSourabh Singh Tomar	.long	.Linfo_string0          # Macro String
3169c8fb1cSSourabh Singh Tomar	.byte	4                       # DW_MACRO_end_file
3269c8fb1cSSourabh Singh Tomar	.byte	0                       # End Of Macro List Mark
3369c8fb1cSSourabh Singh Tomar
3469c8fb1cSSourabh Singh Tomar	.section	.debug_macinfo,"",@progbits
3569c8fb1cSSourabh Singh Tomar.Lcu_macro_begin1:
3669c8fb1cSSourabh Singh Tomar	.byte	3                       # DW_MACINFO_start_file
3769c8fb1cSSourabh Singh Tomar	.byte	0                       # Line Number
3869c8fb1cSSourabh Singh Tomar	.byte	2                       # File Number
3969c8fb1cSSourabh Singh Tomar	.byte	1                       # DW_MACINFO_define
4069c8fb1cSSourabh Singh Tomar	.byte	6                       # Line Number
4169c8fb1cSSourabh Singh Tomar	.asciz	"DWARF_VERSION 4"      # Macro String
4269c8fb1cSSourabh Singh Tomar	.byte	4                       # DW_MACINFO_end_file
4369c8fb1cSSourabh Singh Tomar	.byte	0                       # End Of Macro List Mark
4469c8fb1cSSourabh Singh Tomar
4569c8fb1cSSourabh Singh Tomar	.section	.debug_str,"MS",@progbits,1
4669c8fb1cSSourabh Singh Tomar.Linfo_string0:
4769c8fb1cSSourabh Singh Tomar	.asciz	"DWARF_VERSION 5"
48