1 # The code below is the reduced version of the output
2 # from the following invocation and source:
8 # clang -gdwarf-5 -ffunction-sections test.cpp -o test.s -S
10 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -dwarf-version=5 %s -o %t.o
11 # RUN: llvm-objdump -d --line-numbers -r -s --section-headers -t %t.o | FileCheck %s
14 # CHECK: 0000000000000000 <_Z2f1v>
15 # CHECK-NOT: test.cpp:2
17 # CHECK-NOT: test.cpp:2
18 # CHECK: 0000000000000000 <_Z2f2v>
19 # CHECK-NOT: test.cpp:1
21 # CHECK-NOT: test.cpp:1
26 .section .text._Z2f1v,"ax",@progbits
27 .globl _Z2f1v # -- Begin function _Z2f1v
29 .type _Z2f1v,@function
32 .file 0 "/home/avl" "test.cpp" md5 0xefae234cc05b45384d782316d3a5d338
33 .loc 0 1 0 # test.cpp:1:0
37 .cfi_def_cfa_offset 16
40 .cfi_def_cfa_register %rbp
42 .loc 0 1 12 prologue_end # test.cpp:1:12
48 .size _Z2f1v, .Lfunc_end0-_Z2f1v
51 .section .text._Z2f2v,"ax",@progbits
52 .globl _Z2f2v # -- Begin function _Z2f2v
54 .type _Z2f2v,@function
57 .loc 0 2 0 # test.cpp:2:0
61 .cfi_def_cfa_offset 16
64 .cfi_def_cfa_register %rbp
66 .loc 0 2 12 prologue_end # test.cpp:2:12
72 .size _Z2f2v, .Lfunc_end1-_Z2f2v
75 .section .debug_str_offsets,"",@progbits
80 .section .debug_str,"MS",@progbits,1
82 .asciz "clang version 9.0.0 (https://github.com/llvm/llvm-project.git ebfc1e5af7a65381d858612517e6414ef58df482)" # string offset=0
84 .asciz "test.cpp" # string offset=104
86 .asciz "/home/avl" # string offset=113
88 .asciz "_Z2f1v" # string offset=123
90 .asciz "f1" # string offset=130
92 .asciz "_Z2f2v" # string offset=133
94 .asciz "f2" # string offset=140
95 .section .debug_str_offsets,"",@progbits
103 .section .debug_abbrev,"",@progbits
104 .byte 1 # Abbreviation Code
105 .byte 17 # DW_TAG_compile_unit
106 .byte 1 # DW_CHILDREN_yes
107 .byte 37 # DW_AT_producer
108 .byte 37 # DW_FORM_strx1
109 .byte 19 # DW_AT_language
110 .byte 5 # DW_FORM_data2
112 .byte 37 # DW_FORM_strx1
113 .byte 114 # DW_AT_str_offsets_base
114 .byte 23 # DW_FORM_sec_offset
115 .byte 16 # DW_AT_stmt_list
116 .byte 23 # DW_FORM_sec_offset
117 .byte 27 # DW_AT_comp_dir
118 .byte 37 # DW_FORM_strx1
119 .byte 115 # DW_AT_addr_base
120 .byte 23 # DW_FORM_sec_offset
121 .byte 17 # DW_AT_low_pc
122 .byte 1 # DW_FORM_addr
123 .byte 85 # DW_AT_ranges
124 .byte 35 # DW_FORM_rnglistx
125 .byte 116 # DW_AT_rnglists_base
126 .byte 23 # DW_FORM_sec_offset
129 .byte 2 # Abbreviation Code
130 .byte 46 # DW_TAG_subprogram
131 .byte 0 # DW_CHILDREN_no
132 .byte 17 # DW_AT_low_pc
133 .byte 27 # DW_FORM_addrx
134 .byte 18 # DW_AT_high_pc
135 .byte 6 # DW_FORM_data4
136 .byte 64 # DW_AT_frame_base
137 .byte 24 # DW_FORM_exprloc
138 .byte 110 # DW_AT_linkage_name
139 .byte 37 # DW_FORM_strx1
141 .byte 37 # DW_FORM_strx1
142 .byte 58 # DW_AT_decl_file
143 .byte 11 # DW_FORM_data1
144 .byte 59 # DW_AT_decl_line
145 .byte 11 # DW_FORM_data1
146 .byte 63 # DW_AT_external
147 .byte 25 # DW_FORM_flag_present
151 .section .debug_info,"",@progbits
153 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
155 .short 5 # DWARF version number
156 .byte 1 # DWARF Unit Type
157 .byte 8 # Address Size (in bytes)
158 .long .debug_abbrev # Offset Into Abbrev. Section
159 .byte 1 # Abbrev [1] 0xc:0x38 DW_TAG_compile_unit
160 .byte 0 # DW_AT_producer
161 .short 4 # DW_AT_language
163 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
164 .long .Lline_table_start0 # DW_AT_stmt_list
165 .byte 2 # DW_AT_comp_dir
166 .long .Laddr_table_base0 # DW_AT_addr_base
167 .quad 0 # DW_AT_low_pc
168 .byte 0 # DW_AT_ranges
169 .long .Lrnglists_table_base0 # DW_AT_rnglists_base
170 .byte 2 # Abbrev [2] 0x2b:0xc DW_TAG_subprogram
171 .byte 0 # DW_AT_low_pc
172 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
173 .byte 1 # DW_AT_frame_base
175 .byte 3 # DW_AT_linkage_name
177 .byte 1 # DW_AT_decl_file
178 .byte 1 # DW_AT_decl_line
180 .byte 2 # Abbrev [2] 0x37:0xc DW_TAG_subprogram
181 .byte 1 # DW_AT_low_pc
182 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
183 .byte 1 # DW_AT_frame_base
185 .byte 5 # DW_AT_linkage_name
187 .byte 1 # DW_AT_decl_file
188 .byte 2 # DW_AT_decl_line
190 .byte 0 # End Of Children Mark
192 .section .debug_rnglists,"",@progbits
193 .long .Ldebug_rnglist_table_end0-.Ldebug_rnglist_table_start0 # Length
194 .Ldebug_rnglist_table_start0:
196 .byte 8 # Address size
197 .byte 0 # Segment selector size
198 .long 1 # Offset entry count
199 .Lrnglists_table_base0:
200 .long .Ldebug_ranges0-.Lrnglists_table_base0
202 .byte 3 # DW_RLE_startx_length
203 .byte 0 # start index
204 .uleb128 .Lfunc_end0-.Lfunc_begin0 # length
205 .byte 3 # DW_RLE_startx_length
206 .byte 1 # start index
207 .uleb128 .Lfunc_end1-.Lfunc_begin1 # length
208 .byte 0 # DW_RLE_end_of_list
209 .Ldebug_rnglist_table_end0:
211 .short 5 # DWARF version number
212 .byte 8 # Address size
213 .byte 0 # Segment selector size
219 .section .debug_line,"",@progbits