1# REQUIRES: x86-registered-target 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t.o 4# RUN: llvm-symbolizer --obj=%t.o --functions=none 0 1 | FileCheck %s 5# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=5 %s -o %t.o 6# RUN: llvm-symbolizer --obj=%t.o --functions=none 0 1 | FileCheck %s 7 8# Absolute include-dirs should not have comp-dir prepended 9# CHECK: /absolute{{/|\\}}1.cc:1:0 10# Relative include-dirs should have comp-dir prepended 11# CHECK: /comp_dir{{/|\\}}relative{{/|\\}}2.cc:2:1 12 13.Lfunc_begin0: 14 .file 1 "/absolute" "1.cc" 15 .file 2 "relative" "2.cc" 16 .loc 1 1 0 # 1.cc:1:0 17 nop 18 .loc 2 2 1 # 2.cc:2:1 19 nop 20 .loc 1 1 1 prologue_end # 1.cc:1:1 21.Lfunc_end0: 22 23.section .debug_abbrev,"",@progbits 24 .byte 1 # Abbreviation Code 25 .byte 17 # DW_TAG_compile_unit 26 .byte 1 # DW_children_yes 27 .byte 16 # DW_AT_stmt_list 28 .byte 23 # DW_FROM_sec_offset 29 .byte 17 # DW_AT_low_pc 30 .byte 1 # DW_FORM_addr 31 .byte 18 # DW_AT_high_pc 32 .byte 6 # DW_FORM_data4 33 .byte 27 # DW_AT_comp_dir 34 .byte 8 # DW_FORM_string 35 .byte 0 # EOM(1) 36 .byte 0 # EOM(2) 37 38 .byte 2 # Abbreviation Code 39 .byte 46 # DW_TAG_subprogram 40 .byte 0 # DW_children_no 41 .byte 3 # DW_AT_name 42 .byte 8 # DW_FORM_string 43 .byte 17 # DW_AT_low_pc 44 .byte 1 # DW_FORM_addr 45 .byte 18 # DW_AT_high_pc 46 .byte 6 # DW_FORM_data4 47 .byte 27 # DW_AT_comp_dir 48 .byte 8 # DW_FORM_string 49 .byte 0 # EOM(1) 50 .byte 0 # EOM(2) 51 52 .byte 0 # EOM(3) 53 54.section .debug_info,"",@progbits 55.Lcu_begin0: 56 .long .Lcu_end0-.Lcu_begin0-4 # Length of Unit 57 .short 5 # DWARF version number 58 .byte 1 # DWARF Unit Type 59 .byte 8 # Address Size (in bytes) 60 .long .debug_abbrev # Offset Into Abbrev. 61 .byte 1 # Abbrev [1] 62 .long 0 # DW_AT_stmt_list 63 .quad 0 # DW_AT_low_pc 64 .long 2 # DW_AT_high_pc 65 .asciz "/comp_dir" # DW_AT_comp_dir 66 .byte 2 # Abbrev [2] DW_TAG_subprogram 67 .asciz "1.c" # DW_AT_name 68 .quad 0 # DW_AT_low_pc 69 .long 2 # DW_AT_high_pc 70 .asciz "/comp_dir" # DW_AT_comp_dir 71 .byte 0 72.Lcu_end0: 73