1 REQUIRES: x86-registered-target
3 RUN: mkdir -p %t/.build-id/ab
4 RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t/asm.s \
5 RUN: -o %t/.build-id/ab/cdef.debug
6 RUN: llvm-symbolizer --debug-file-directory=%t --filter-markup < %t/input \
7 RUN: > %t.output 2> %t.err
8 RUN: FileCheck %s --input-file=%t.output --match-full-lines \
9 RUN: --implicit-check-not {{.}}
10 RUN: FileCheck %s --check-prefix=ERR --input-file=%t.err --match-full-lines
12 CHECK: [[BEGIN:\[{3}]]ELF module #0x0 "a.o"; BuildID=abcdef [0x0-0xff](r)[[END:\]{3}]]
13 CHECK: first[/dir[[SEP:[/\\]]]tmp.c:3]
14 CHECK: first[/dir[[SEP]]tmp.c:5]
15 CHECK: first[/dir[[SEP]]tmp.c:4]
16 CHECK: first[/dir[[SEP]]tmp.c:5]
18 CHECK: [[BEGIN]]pc:0xff[[END]]
19 CHECK: [[BEGIN]]pc:0x100[[END]]
20 CHECK: first[/dir[[SEP]]tmp.c:5]
21 ERR: error: no mmap covers address
22 ERR: warning: expected at most 2 field(s); found 3
24 ERR: error: expected at least 1 field(s); found 0
25 ERR: error: expected PC type; found ''
28 {{{module:0:a.o:elf:abcdef}}}
29 {{{mmap:0:256:load:0:r:0}}}
44 .globl first # -- Begin function first
49 .file 1 "/dir" "tmp.c"
50 .loc 1 3 0 # tmp.c:3:0
54 .cfi_def_cfa_offset 16
57 .cfi_def_cfa_register %rbp
59 .loc 1 4 3 prologue_end # tmp.c:4:3
61 .loc 1 5 1 # tmp.c:5:1
67 .size first, .Lfunc_end0-first
70 .globl second # -- Begin function second
72 .type second,@function
75 .loc 1 7 0 # tmp.c:7:0
79 .cfi_def_cfa_offset 16
82 .cfi_def_cfa_register %rbp
84 .loc 1 8 3 prologue_end # tmp.c:8:3
86 .loc 1 9 1 # tmp.c:9:1
92 .size second, .Lfunc_end1-second
95 .section .debug_abbrev,"",@progbits
96 .byte 1 # Abbreviation Code
97 .byte 17 # DW_TAG_compile_unit
98 .byte 1 # DW_CHILDREN_yes
99 .byte 37 # DW_AT_producer
100 .byte 14 # DW_FORM_strp
101 .byte 19 # DW_AT_language
102 .byte 5 # DW_FORM_data2
104 .byte 14 # DW_FORM_strp
105 .byte 16 # DW_AT_stmt_list
106 .byte 23 # DW_FORM_sec_offset
107 .byte 27 # DW_AT_comp_dir
108 .byte 14 # DW_FORM_strp
109 .byte 17 # DW_AT_low_pc
110 .byte 1 # DW_FORM_addr
111 .byte 18 # DW_AT_high_pc
112 .byte 6 # DW_FORM_data4
115 .byte 2 # Abbreviation Code
116 .byte 46 # DW_TAG_subprogram
117 .byte 0 # DW_CHILDREN_no
118 .byte 17 # DW_AT_low_pc
119 .byte 1 # DW_FORM_addr
120 .byte 18 # DW_AT_high_pc
121 .byte 6 # DW_FORM_data4
122 .byte 64 # DW_AT_frame_base
123 .byte 24 # DW_FORM_exprloc
125 .byte 14 # DW_FORM_strp
126 .byte 58 # DW_AT_decl_file
127 .byte 11 # DW_FORM_data1
128 .byte 59 # DW_AT_decl_line
129 .byte 11 # DW_FORM_data1
130 .byte 39 # DW_AT_prototyped
131 .byte 25 # DW_FORM_flag_present
132 .byte 63 # DW_AT_external
133 .byte 25 # DW_FORM_flag_present
137 .section .debug_info,"",@progbits
139 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
141 .short 4 # DWARF version number
142 .long .debug_abbrev # Offset Into Abbrev. Section
143 .byte 8 # Address Size (in bytes)
144 .byte 1 # Abbrev [1] 0xb:0x4a DW_TAG_compile_unit
145 .long .Linfo_string0 # DW_AT_producer
146 .short 12 # DW_AT_language
147 .long .Linfo_string1 # DW_AT_name
148 .long .Lline_table_start0 # DW_AT_stmt_list
149 .long .Linfo_string2 # DW_AT_comp_dir
150 .quad .Lfunc_begin0 # DW_AT_low_pc
151 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
152 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
153 .quad .Lfunc_begin0 # DW_AT_low_pc
154 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
155 .byte 1 # DW_AT_frame_base
157 .long .Linfo_string3 # DW_AT_name
158 .byte 1 # DW_AT_decl_file
159 .byte 3 # DW_AT_decl_line
162 .byte 2 # Abbrev [2] 0x3f:0x15 DW_TAG_subprogram
163 .quad .Lfunc_begin1 # DW_AT_low_pc
164 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
165 .byte 1 # DW_AT_frame_base
167 .long .Linfo_string4 # DW_AT_name
168 .byte 1 # DW_AT_decl_file
169 .byte 7 # DW_AT_decl_line
172 .byte 0 # End Of Children Mark
174 .section .debug_str,"MS",@progbits,1
176 .asciz "clang" # string offset=0
178 .asciz "tmp.c" # string offset=30
180 .asciz "/dir" # string offset=36
182 .asciz "first" # string offset=85
184 .asciz "second" # string offset=91
186 .section ".note.GNU-stack","",@progbits
190 .section .debug_line,"",@progbits