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 [0x10-0x10f](r)[[END:\]{3}]]
13 CHECK: #0.1 0x0000000000000018 second /tmp[[SEP:[/\\]]]tmp.c:8:3 (a.o+0x8)
14 CHECK: #0 0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)
15 CHECK: #1.1 0x0000000000000018 second /tmp[[SEP]]tmp.c:8:3 (a.o+0x8)
16 CHECK: #1 0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)
17 CHECK: #0.1 0x0000000000000018 second /tmp[[SEP]]tmp.c:8:3 (a.o+0x8)
18 CHECK: #0 0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)
19 CHECK: #0 0x0000000000000019 first /tmp[[SEP]]tmp.c:5:1 (a.o+0x9)
20 CHECK: #0 0x00000000000000fe (a.o+0xee)
22 CHECK: #0 0x00000000000000fe (a.o+0xee)
23 ERR: warning: expected at most 3 field(s); found 4
24 CHECK: [[BEGIN]]bt:0:0x111[[END]]
25 ERR: error: no mmap covers address
27 ERR: error: expected at least 2 field(s); found 0
28 ERR: error: expected PC type; found ''
31 {{{module:0:a.o:elf:abcdef}}}
32 {{{mmap:0x10:256:load:0:r:0}}}
39 {{{bt:0:0xff:pc:ext}}}
45 # Generated by running "clang -finline -g -S tmp.c" in the following tmp.c on
48 # static void second(void);
52 # void second(void) {}
55 .globl first # -- Begin function first
60 .file 1 "/tmp" "tmp.c"
61 .loc 1 3 0 # tmp.c:3:0
65 .cfi_def_cfa_offset 16
68 .cfi_def_cfa_register %rbp
70 .loc 1 8 3 prologue_end # tmp.c:8:3
73 .loc 1 5 1 # tmp.c:5:1
79 .size first, .Lfunc_end0-first
82 .section .debug_abbrev,"",@progbits
83 .byte 1 # Abbreviation Code
84 .byte 17 # DW_TAG_compile_unit
85 .byte 1 # DW_CHILDREN_yes
86 .byte 37 # DW_AT_producer
87 .byte 14 # DW_FORM_strp
88 .byte 19 # DW_AT_language
89 .byte 5 # DW_FORM_data2
91 .byte 14 # DW_FORM_strp
92 .byte 16 # DW_AT_stmt_list
93 .byte 23 # DW_FORM_sec_offset
94 .byte 27 # DW_AT_comp_dir
95 .byte 14 # DW_FORM_strp
96 .byte 17 # DW_AT_low_pc
97 .byte 1 # DW_FORM_addr
98 .byte 18 # DW_AT_high_pc
99 .byte 6 # DW_FORM_data4
102 .byte 2 # Abbreviation Code
103 .byte 46 # DW_TAG_subprogram
104 .byte 0 # DW_CHILDREN_no
106 .byte 14 # DW_FORM_strp
107 .byte 58 # DW_AT_decl_file
108 .byte 11 # DW_FORM_data1
109 .byte 59 # DW_AT_decl_line
110 .byte 11 # DW_FORM_data1
111 .byte 39 # DW_AT_prototyped
112 .byte 25 # DW_FORM_flag_present
113 .byte 63 # DW_AT_external
114 .byte 25 # DW_FORM_flag_present
115 .byte 32 # DW_AT_inline
116 .byte 11 # DW_FORM_data1
119 .byte 3 # Abbreviation Code
120 .byte 46 # DW_TAG_subprogram
121 .byte 1 # DW_CHILDREN_yes
122 .byte 17 # DW_AT_low_pc
123 .byte 1 # DW_FORM_addr
124 .byte 18 # DW_AT_high_pc
125 .byte 6 # DW_FORM_data4
126 .byte 64 # DW_AT_frame_base
127 .byte 24 # DW_FORM_exprloc
129 .byte 14 # DW_FORM_strp
130 .byte 58 # DW_AT_decl_file
131 .byte 11 # DW_FORM_data1
132 .byte 59 # DW_AT_decl_line
133 .byte 11 # DW_FORM_data1
134 .byte 39 # DW_AT_prototyped
135 .byte 25 # DW_FORM_flag_present
136 .byte 63 # DW_AT_external
137 .byte 25 # DW_FORM_flag_present
140 .byte 4 # Abbreviation Code
141 .byte 29 # DW_TAG_inlined_subroutine
142 .byte 0 # DW_CHILDREN_no
143 .byte 49 # DW_AT_abstract_origin
144 .byte 19 # DW_FORM_ref4
145 .byte 17 # DW_AT_low_pc
146 .byte 1 # DW_FORM_addr
147 .byte 18 # DW_AT_high_pc
148 .byte 6 # DW_FORM_data4
149 .byte 88 # DW_AT_call_file
150 .byte 11 # DW_FORM_data1
151 .byte 89 # DW_AT_call_line
152 .byte 11 # DW_FORM_data1
153 .byte 87 # DW_AT_call_column
154 .byte 11 # DW_FORM_data1
158 .section .debug_info,"",@progbits
160 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
162 .short 4 # DWARF version number
163 .long .debug_abbrev # Offset Into Abbrev. Section
164 .byte 8 # Address Size (in bytes)
165 .byte 1 # Abbrev [1] 0xb:0x52 DW_TAG_compile_unit
166 .long .Linfo_string0 # DW_AT_producer
167 .short 12 # DW_AT_language
168 .long .Linfo_string1 # DW_AT_name
169 .long .Lline_table_start0 # DW_AT_stmt_list
170 .long .Linfo_string2 # DW_AT_comp_dir
171 .quad .Lfunc_begin0 # DW_AT_low_pc
172 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
173 .byte 2 # Abbrev [2] 0x2a:0x8 DW_TAG_subprogram
174 .long .Linfo_string3 # DW_AT_name
175 .byte 1 # DW_AT_decl_file
176 .byte 7 # DW_AT_decl_line
179 .byte 1 # DW_AT_inline
180 .byte 3 # Abbrev [3] 0x32:0x2a DW_TAG_subprogram
181 .quad .Lfunc_begin0 # DW_AT_low_pc
182 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
183 .byte 1 # DW_AT_frame_base
185 .long .Linfo_string4 # DW_AT_name
186 .byte 1 # DW_AT_decl_file
187 .byte 3 # DW_AT_decl_line
190 .byte 4 # Abbrev [4] 0x47:0x14 DW_TAG_inlined_subroutine
191 .long 42 # DW_AT_abstract_origin
192 .quad .Ltmp0 # DW_AT_low_pc
193 .long .Ltmp1-.Ltmp0 # DW_AT_high_pc
194 .byte 1 # DW_AT_call_file
195 .byte 4 # DW_AT_call_line
196 .byte 3 # DW_AT_call_column
197 .byte 0 # End Of Children Mark
198 .byte 0 # End Of Children Mark
200 .section .debug_str,"MS",@progbits,1
202 .asciz "Debian clang version 13.0.1-6" # string offset=0
204 .asciz "tmp.c" # string offset=30
206 .asciz "/tmp" # string offset=36
208 .asciz "second" # string offset=85
210 .asciz "first" # string offset=92
211 .ident "Debian clang version 13.0.1-6"
212 .section ".note.GNU-stack","",@progbits
215 .section .debug_line,"",@progbits