120 lines · plain
1# RUN: rm -rf %t2# RUN: mkdir %t3# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/shared-abbrev.o4# RUN: %clang %cflags %t/shared-abbrev.o -o %t/shared-abbrev.exe5# RUN: llvm-bolt %t/shared-abbrev.exe -o %t/shared-abbrev.exe.bolt --update-debug-sections6# RUN: llvm-dwarfdump --debug-info %t/shared-abbrev.exe.bolt | FileCheck %s7 8# CHECK: 0x00000000:9# CHECK-SAME: abbr_offset = 0x000010# CHECK-EMPTY:11# CHECK-NEXT: DW_TAG_compile_unit12# CHECK-NEXT: DW_AT_stmt_list13# CHECK-NEXT: DW_AT_low_pc14# CHECK-NEXT: DW_AT_ranges15# CHECK: 0x0000001c:16# CHECK-SAME: abbr_offset = 0x000017# CHECK-EMPTY:18# CHECK: DW_TAG_compile_unit19# CHECK-NEXT: DW_AT_stmt_list20# CHECK-NEXT: DW_AT_low_pc21# CHECK-NEXT: DW_AT_ranges22# CHECK: 0x00000038:23# CHECK-SAME: abbr_offset = 0x000024# CHECK-EMPTY:25# CHECK-NEXT: DW_TAG_compile_unit26# CHECK-NEXT: DW_AT_stmt_list27# CHECK-NEXT: DW_AT_low_pc28# CHECK-NEXT: DW_AT_ranges29 30 .text31 .file "main.cpp"32 .globl main # -- Begin function main33 .p2align 4, 0x9034 .type main,@function35main: # @main36.Lfunc_begin0:37 .file 1 "test" "main.cpp"38 .loc 1 1 0 # main.cpp:1:039 .cfi_startproc40 .cfi_def_cfa %rsp, 841 retq42.Ltmp1:43.Lfunc_end0:44 .size main, .Lfunc_end0-main45 .cfi_endproc46 # -- End function47 .section .debug_abbrev,"",@progbits48 .byte 1 # Abbreviation Code49 .byte 17 # DW_TAG_compile_unit50 .byte 0 # DW_CHILDREN_no51 .byte 16 # DW_AT_stmt_list52 .byte 23 # DW_FORM_sec_offset53 .byte 17 # DW_AT_low_pc54 .byte 1 # DW_FORM_addr55 .byte 18 # DW_AT_high_pc56 .byte 7 # DW_FORM_data857 .byte 0 # EOM(1)58 .byte 0 # EOM(2)59 .byte 2 # Abbreviation Code60 .byte 17 # DW_TAG_compile_unit61 .byte 0 # DW_CHILDREN_no62 .byte 16 # DW_AT_stmt_list63 .byte 23 # DW_FORM_sec_offset64 .byte 17 # DW_AT_low_pc65 .byte 1 # DW_FORM_addr66 .byte 85 # DW_AT_ranges67 .byte 23 # DW_FORM_sec_offset68 .byte 0 # EOM(1)69 .byte 0 # EOM(2)70 .byte 0 # EOM(3)71 .section .debug_info,"",@progbits72.Lcu_begin0:73 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit74.Ldebug_info_start0:75 .short 4 # DWARF version number76 .long .debug_abbrev # Offset Into Abbrev. Section77 .byte 8 # Address Size (in bytes)78 .byte 2 # Abbrev [2] DW_TAG_compile_unit79 .long .Lline_table_start0 # DW_AT_stmt_list80 .quad 0 # DW_AT_low_pc81 .long .Ldebug_ranges0 # DW_AT_ranges --- end manual --82.Ldebug_info_end0:83 84 # Second CU table.85 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit86.Ldebug_info_start1:87 .short 4 # DWARF version number88 .long .debug_abbrev # Offset Into Abbrev. Section89 .byte 8 # Address Size (in bytes)90 .byte 1 # Abbrev [1] DW_TAG_compile_unit91 .long .Lline_table_start0 # DW_AT_stmt_list92 .quad .Lfunc_begin0 # DW_AT_low_pc93 .quad .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc94 .byte 0 # End Of Children Mark95.Ldebug_info_end1:96 97 # Third CU table.98 .long .Ldebug_info_end2-.Ldebug_info_start2 # Length of Unit99.Ldebug_info_start2:100 .short 4 # DWARF version number101 .long .debug_abbrev # Offset Into Abbrev. Section102 .byte 8 # Address Size (in bytes)103 .byte 2 # Abbrev [2] DW_TAG_compile_unit104 .long .Lline_table_start0 # DW_AT_stmt_list105 .quad 0 # DW_AT_low_pc106 .long .Ldebug_ranges0 # DW_AT_ranges --- end manual --107.Ldebug_info_end2:108 .section .debug_ranges,"",@progbits109.Ldebug_ranges0:110 .quad .Lfunc_begin0111 .quad .Lfunc_end0112 .quad .Lfunc_begin0113 .quad .Lfunc_end0114 .quad 0115 .quad 0116 .section ".note.GNU-stack","",@progbits117 .addrsig118 .section .debug_line,"",@progbits119.Lline_table_start0:120