120 lines · plain
1## This test checks that llvm-dwarfdump can dump debug_macro2## section containing contributions from multiple CU's represented3## using DW_MACRO_define_strx form.4 5# RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \6# RUN: llvm-dwarfdump -debug-macro - | FileCheck -strict-whitespace -match-full-lines %s7 8# CHECK:.debug_macro contents:9# CHECK-NEXT:0x00000000:10# CHECK-NEXT:macro header: version = 0x0005, flags = 0x02, format = DWARF32, debug_line_offset = 0x0000000011# CHECK-NEXT:DW_MACRO_start_file - lineno: 0 filenum: 012# CHECK-NEXT: DW_MACRO_define_strx - lineno: 1 macro: DWARF_VERSION 513# CHECK-NEXT: DW_MACRO_define_strx - lineno: 2 macro: COMPILE_UNIT 114# CHECK-NEXT: DW_MACRO_undef_strx - lineno: 3 macro: COMPILE_UNIT15# CHECK-NEXT:DW_MACRO_end_file16 17# CHECK:0x00000015:18# CHECK-NEXT:macro header: version = 0x0005, flags = 0x02, format = DWARF32, debug_line_offset = 0x0000000019# CHECK-NEXT:DW_MACRO_start_file - lineno: 1 filenum: 320# CHECK-NEXT: DW_MACRO_define_strx - lineno: 2 macro: COMPILE_UNIT 221# CHECK-NEXT: DW_MACRO_undef_strx - lineno: 3 macro: COMPILE_UNIT22# CHECK-NEXT:DW_MACRO_end_file23 24 .section .debug_abbrev,"",@progbits25 .byte 1 # Abbreviation Code26 .byte 17 # DW_TAG_compile_unit27 .byte 0 # DW_CHILDREN_no28 .byte 114 # DW_AT_str_offsets_base29 .byte 23 # DW_FORM_sec_offset30 .byte 121 # DW_AT_macros31 .byte 23 # DW_FORM_sec_offset32 .byte 0 # EOM(1)33 .byte 0 # EOM(2)34 .byte 0 # EOM(3)35 36 .section .debug_info,"",@progbits37.Lcu_begin0:38 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit39.Ldebug_info_start0:40 .short 5 # DWARF version number41 .byte 1 # DWARF Unit Type42 .byte 8 # Address Size (in bytes)43 .long .debug_abbrev # Offset Into Abbrev. Section44 .byte 1 # Abbrev [1] 0xc:0x12 DW_TAG_compile_unit45 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base46 .long .Lcu_macro_begin0 # DW_AT_macros47.Ldebug_info_end0:48.Lcu_begin1:49 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit50.Ldebug_info_start1:51 .short 5 # DWARF version number52 .byte 1 # DWARF Unit Type53 .byte 8 # Address Size (in bytes)54 .long .debug_abbrev # Offset Into Abbrev. Section55 .byte 1 # Abbrev [1] 0xc:0x12 DW_TAG_compile_unit56 .long .Lstr_offsets_base1 # DW_AT_str_offsets_base57 .long .Lcu_macro_begin1 # DW_AT_macros58.Ldebug_info_end1:59 60 .section .debug_macro,"",@progbits61.Lcu_macro_begin0:62 .short 5 # Macro information version63 .byte 2 # Flags: 32 bit, debug_line_offset present64 .long 0 # debug_line_offset65 .byte 3 # DW_MACRO_start_file66 .byte 0 # Line Number67 .byte 0 # File Number68 .byte 11 # DW_MACRO_define_strx69 .byte 1 # Line Number70 .byte 0 # Macro String71 .byte 11 # DW_MACRO_define_strx72 .byte 2 # Line Number73 .byte 1 # Macro String74 .byte 12 # DW_MACRO_undef_strx75 .byte 3 # Line Number76 .byte 2 # Macro String77 .byte 4 # DW_MACRO_end_file78 .byte 0 # End Of Macro List Mark79.Lcu_macro_begin1:80 .short 5 # Macro information version81 .byte 2 # Flags: 32 bit, debug_line_offset present82 .long 0 # debug_line_offset83 .byte 3 # DW_MACRO_start_file84 .byte 1 # Line Number85 .byte 3 # File Number86 .byte 11 # DW_MACRO_define_strx87 .byte 2 # Line Number88 .byte 0 # Macro String89 .byte 12 # DW_MACRO_undef_strx90 .byte 3 # Line Number91 .byte 1 # Macro String92 .byte 4 # DW_MACRO_end_file93 94 .section .debug_str_offsets,"",@progbits95 .long 16 # Unit length96 .short 5 # Version97 .short 0 # Padding98.Lstr_offsets_base0:99 .long .Linfo_string0100 .long .Linfo_string1101 .long .Linfo_string2102 .long 12 # Unit length103 .short 5 # Version104 .short 0 # Padding105.Lstr_offsets_base1:106 .long .Linfo_string3107 .long .Linfo_string4108 109 .section .debug_str,"MS",@progbits,1110.Linfo_string0:111 .asciz "DWARF_VERSION 5"112.Linfo_string1:113 .asciz "COMPILE_UNIT 1"114.Linfo_string2:115 .asciz "COMPILE_UNIT"116.Linfo_string3:117 .asciz "COMPILE_UNIT 2"118.Linfo_string4:119 .asciz "COMPILE_UNIT"120