brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.1 KiB · b0a5bab Raw
149 lines · plain
1# REQUIRES: system-linux2 3## Check that BOLT correctly prints debug line comments for DWARF-5.4 5 6# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o7# RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q8# RUN: llvm-bolt %t.exe --update-debug-sections --print-debug-info \9# RUN:   --print-after-lowering -o %t.bolt | FileCheck %s10 11# CHECK: xorq    %rdi, %rdi # debug line main.c:2:512 13# __attribute__((naked)) void _start() {14#     __asm__(15#         "xor %rdi, %rdi\n"   // exit code 016#         "mov $60, %rax\n"    // syscall number for exit17#         "syscall\n"18#     );19# }20 21        .file   "main.c"22        .text23        .globl  _start                          # -- Begin function _start24        .p2align        425        .type   _start,@function26_start:                                 # @_start27.Lfunc_begin0:28        .file   0 "/home/gpastukhov/tmp2" "main.c" md5 0x94c0e54a615c2a21415ddb904991abd829        .cfi_startproc30# %bb.0:31        .loc    0 2 5 prologue_end              # main.c:2:532        #APP33        xorq    %rdi, %rdi34        movq    $60, %rax35        syscall36 37        #NO_APP38.Ltmp0:39.Lfunc_end0:40        .size   _start, .Lfunc_end0-_start41        .cfi_endproc42                                        # -- End function43        .section        .debug_abbrev,"",@progbits44        .byte   1                               # Abbreviation Code45        .byte   17                              # DW_TAG_compile_unit46        .byte   1                               # DW_CHILDREN_yes47        .byte   37                              # DW_AT_producer48        .byte   37                              # DW_FORM_strx149        .byte   19                              # DW_AT_language50        .byte   5                               # DW_FORM_data251        .byte   3                               # DW_AT_name52        .byte   37                              # DW_FORM_strx153        .byte   114                             # DW_AT_str_offsets_base54        .byte   23                              # DW_FORM_sec_offset55        .byte   16                              # DW_AT_stmt_list56        .byte   23                              # DW_FORM_sec_offset57        .byte   27                              # DW_AT_comp_dir58        .byte   37                              # DW_FORM_strx159        .byte   17                              # DW_AT_low_pc60        .byte   27                              # DW_FORM_addrx61        .byte   18                              # DW_AT_high_pc62        .byte   6                               # DW_FORM_data463        .byte   115                             # DW_AT_addr_base64        .byte   23                              # DW_FORM_sec_offset65        .byte   0                               # EOM(1)66        .byte   0                               # EOM(2)67        .byte   2                               # Abbreviation Code68        .byte   46                              # DW_TAG_subprogram69        .byte   0                               # DW_CHILDREN_no70        .byte   17                              # DW_AT_low_pc71        .byte   27                              # DW_FORM_addrx72        .byte   18                              # DW_AT_high_pc73        .byte   6                               # DW_FORM_data474        .byte   64                              # DW_AT_frame_base75        .byte   24                              # DW_FORM_exprloc76        .byte   3                               # DW_AT_name77        .byte   37                              # DW_FORM_strx178        .byte   58                              # DW_AT_decl_file79        .byte   11                              # DW_FORM_data180        .byte   59                              # DW_AT_decl_line81        .byte   11                              # DW_FORM_data182        .byte   63                              # DW_AT_external83        .byte   25                              # DW_FORM_flag_present84        .byte   0                               # EOM(1)85        .byte   0                               # EOM(2)86        .byte   0                               # EOM(3)87        .section        .debug_info,"",@progbits88.Lcu_begin0:89        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit90.Ldebug_info_start0:91        .short  5                               # DWARF version number92        .byte   1                               # DWARF Unit Type93        .byte   8                               # Address Size (in bytes)94        .long   .debug_abbrev                   # Offset Into Abbrev. Section95        .byte   1                               # Abbrev [1] 0xc:0x23 DW_TAG_compile_unit96        .byte   0                               # DW_AT_producer97        .short  29                              # DW_AT_language98        .byte   1                               # DW_AT_name99        .long   .Lstr_offsets_base0             # DW_AT_str_offsets_base100        .long   .Lline_table_start0             # DW_AT_stmt_list101        .byte   2                               # DW_AT_comp_dir102        .byte   0                               # DW_AT_low_pc103        .long   .Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc104        .long   .Laddr_table_base0              # DW_AT_addr_base105        .byte   2                               # Abbrev [2] 0x23:0xb DW_TAG_subprogram106        .byte   0                               # DW_AT_low_pc107        .long   .Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc108        .byte   1                               # DW_AT_frame_base109        .byte   87110        .byte   3                               # DW_AT_name111        .byte   0                               # DW_AT_decl_file112        .byte   1                               # DW_AT_decl_line113                                        # DW_AT_external114        .byte   0                               # End Of Children Mark115.Ldebug_info_end0:116        .section        .debug_str_offsets,"",@progbits117        .long   20                              # Length of String Offsets Set118        .short  5119        .short  0120.Lstr_offsets_base0:121        .section        .debug_str,"MS",@progbits,1122.Linfo_string0:123        .asciz  "clang version 20.1.8 (CentOS 20.1.8-1.el9)" # string offset=0124.Linfo_string1:125        .asciz  "main.c"                        # string offset=43126.Linfo_string2:127        .asciz  "/home/gpastukhov/tmp2"         # string offset=50128.Linfo_string3:129        .asciz  "_start"                        # string offset=72130        .section        .debug_str_offsets,"",@progbits131        .long   .Linfo_string0132        .long   .Linfo_string1133        .long   .Linfo_string2134        .long   .Linfo_string3135        .section        .debug_addr,"",@progbits136        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution137.Ldebug_addr_start0:138        .short  5                               # DWARF version number139        .byte   8                               # Address size140        .byte   0                               # Segment selector size141.Laddr_table_base0:142        .quad   .Lfunc_begin0143.Ldebug_addr_end0:144        .ident  "clang version 20.1.8 (CentOS 20.1.8-1.el9)"145        .section        ".note.GNU-stack","",@progbits146        .addrsig147        .section        .debug_line,"",@progbits148.Lline_table_start0:149