1 # Create .debug_line containing absolute path in filename. Show that the path is sensibly printed/found/etc.
2 # REQUIRES: x86-registered-target
4 # RUN: sed s!FILEPATH!%/s! %s > %t.s
5 # RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %t.s -o %t.o
6 # RUN: llvm-symbolizer --obj=%t.o 0 | FileCheck %s -DPATH=%/s
8 # CHECK: {{^}}[[PATH]]:1:0
10 .type _start,@function
16 .section .debug_str,"MS",@progbits,1
24 .section .debug_abbrev,"",@progbits
25 .byte 1 # Abbreviation Code
26 .byte 17 # DW_TAG_compile_unit
27 .byte 1 # DW_CHILDREN_yes
29 .byte 14 # DW_FORM_strp
30 .byte 16 # DW_AT_stmt_list
31 .byte 23 # DW_FORM_sec_offset
32 .byte 27 # DW_AT_comp_dir
33 .byte 14 # DW_FORM_strp
34 .byte 17 # DW_AT_low_pc
35 .byte 1 # DW_FORM_addr
36 .byte 18 # DW_AT_high_pc
37 .byte 6 # DW_FORM_data4
40 .byte 2 # Abbreviation Code
41 .byte 46 # DW_TAG_subprogram
42 .byte 0 # DW_CHILDREN_no
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
48 .byte 14 # DW_FORM_strp
49 .byte 58 # DW_AT_decl_file
50 .byte 11 # DW_FORM_data1
51 .byte 59 # DW_AT_decl_line
52 .byte 11 # DW_FORM_data1
53 .byte 63 # DW_AT_external
54 .byte 25 # DW_FORM_flag_present
58 .section .debug_info,"",@progbits
59 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
61 .short 4 # DWARF version number
62 .long .debug_abbrev # Offset Into Abbrev. Section
63 .byte 8 # Address Size (in bytes)
64 .byte 1 # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit
65 .long .Linfo_string1 # DW_AT_name
66 .long .Lline_table_start0 # DW_AT_stmt_list
67 .long .Linfo_string2 # DW_AT_comp_dir
68 .quad .Lfunc_begin0 # DW_AT_low_pc
69 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
70 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
71 .quad .Lfunc_begin0 # DW_AT_low_pc
72 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
73 .long .Linfo_string3 # DW_AT_name
74 .byte 1 # DW_AT_decl_file
75 .byte 1 # DW_AT_decl_line
77 .byte 0 # End Of Children Mark
80 # Hand-written .debug_line to allow replacing in the absolute path
81 # into the filename table at runtime.
82 .section .debug_line,"",@progbits
84 .long .Ltable_end - .Ltable_start # unit length
87 .long .Lheader_end - .Lheader_start # header length
89 .byte 1 # min instruction length
90 .byte 1 # max ops per instruction
91 .byte 1 # default is_stmt
94 .byte 13 # opcode base
95 .byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # standard opcode lengths
96 .byte 0 # directory table
97 .asciz "FILEPATH" # filename table
101 .byte 0, 9, 2 # DW_LNE_set_address
103 .byte 1 # DW_LNS_copy
104 .byte 33 # +1 address, +1 line
105 .byte 0, 1, 1 # DW_LNE_end_sequence