1 # clang++ -ffunction-sections -g2 -gdwarf-5
2 # Manually modified to use ranges like what generates sometimes -fbasic-block-sections=all,
3 # and changed start of range to 0.
4 # int doStuff(int val) {
10 # int main(int argc, const char** argv) {
11 # return doStuff(argc);
15 .section .text._Z7doStuffi,"ax",@progbits
16 .globl _Z7doStuffi # -- Begin function _Z7doStuffi
18 .type _Z7doStuffi,@function
19 _Z7doStuffi
: # @_Z7doStuffi
21 .file 0 "/subprogramRanges" "main.cpp" md5 0x45fd34ef778739dca24be206894f1d15
22 .loc 0 1 0 # main.cpp:1:0
26 .cfi_def_cfa_offset 16
29 .cfi_def_cfa_register %rbp
32 .loc 0 2 7 prologue_end # main.cpp:2:7
35 .loc 0 2 7 is_stmt 0 # main.cpp:2:7
39 .loc 0 3 5 is_stmt 1 # main.cpp:3:5
45 .loc 0 4 10 # main.cpp:4:10
47 .loc 0 4 3 epilogue_begin is_stmt 0 # main.cpp:4:3
53 .size _Z7doStuffi, .Lfunc_end0-_Z7doStuffi
56 .section .text.main,"ax",@progbits
57 .globl main # -- Begin function main
62 .loc 0 7 0 is_stmt 1 # main.cpp:7:0
66 .cfi_def_cfa_offset 16
69 .cfi_def_cfa_register %rbp
75 .loc 0 8 21 prologue_end # main.cpp:8:21
77 .loc 0 8 13 is_stmt 0 # main.cpp:8:13
79 .loc 0 8 5 epilogue_begin # main.cpp:8:5
86 .size main, .Lfunc_end1-main
89 .section .debug_abbrev,"",@progbits
90 .byte 1 # Abbreviation Code
91 .byte 17 # DW_TAG_compile_unit
92 .byte 1 # DW_CHILDREN_yes
93 .byte 37 # DW_AT_producer
94 .byte 37 # DW_FORM_strx1
95 .byte 19 # DW_AT_language
96 .byte 5 # DW_FORM_data2
98 .byte 37 # DW_FORM_strx1
99 .byte 114 # DW_AT_str_offsets_base
100 .byte 23 # DW_FORM_sec_offset
101 .byte 16 # DW_AT_stmt_list
102 .byte 23 # DW_FORM_sec_offset
103 .byte 27 # DW_AT_comp_dir
104 .byte 37 # DW_FORM_strx1
105 .byte 17 # DW_AT_low_pc
106 .byte 1 # DW_FORM_addr
107 .byte 85 # DW_AT_ranges
108 .byte 35 # DW_FORM_rnglistx
109 .byte 115 # DW_AT_addr_base
110 .byte 23 # DW_FORM_sec_offset
111 .byte 116 # DW_AT_rnglists_base
112 .byte 23 # DW_FORM_sec_offset
115 .byte 2 # Abbreviation Code
116 .byte 46 # DW_TAG_subprogram
117 .byte 1 # DW_CHILDREN_yes
118 .byte 85 # DW_AT_ranges
119 .byte 35 # DW_FORM_rnglistx
120 .byte 64 # DW_AT_frame_base
121 .byte 24 # DW_FORM_exprloc
122 .byte 110 # DW_AT_linkage_name
123 .byte 37 # DW_FORM_strx1
125 .byte 37 # DW_FORM_strx1
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 73 # DW_AT_type
131 .byte 19 # DW_FORM_ref4
132 .byte 63 # DW_AT_external
133 .byte 25 # DW_FORM_flag_present
136 .byte 3 # Abbreviation Code
137 .byte 5 # DW_TAG_formal_parameter
138 .byte 0 # DW_CHILDREN_no
139 .byte 2 # DW_AT_location
140 .byte 24 # DW_FORM_exprloc
142 .byte 37 # DW_FORM_strx1
143 .byte 58 # DW_AT_decl_file
144 .byte 11 # DW_FORM_data1
145 .byte 59 # DW_AT_decl_line
146 .byte 11 # DW_FORM_data1
147 .byte 73 # DW_AT_type
148 .byte 19 # DW_FORM_ref4
151 .byte 4 # Abbreviation Code
152 .byte 46 # DW_TAG_subprogram
153 .byte 1 # DW_CHILDREN_yes
154 .byte 17 # DW_AT_low_pc
155 .byte 27 # DW_FORM_addrx
156 .byte 18 # DW_AT_high_pc
157 .byte 6 # DW_FORM_data4
158 .byte 64 # DW_AT_frame_base
159 .byte 24 # DW_FORM_exprloc
161 .byte 37 # DW_FORM_strx1
162 .byte 58 # DW_AT_decl_file
163 .byte 11 # DW_FORM_data1
164 .byte 59 # DW_AT_decl_line
165 .byte 11 # DW_FORM_data1
166 .byte 73 # DW_AT_type
167 .byte 19 # DW_FORM_ref4
168 .byte 63 # DW_AT_external
169 .byte 25 # DW_FORM_flag_present
172 .byte 5 # Abbreviation Code
173 .byte 36 # DW_TAG_base_type
174 .byte 0 # DW_CHILDREN_no
176 .byte 37 # DW_FORM_strx1
177 .byte 62 # DW_AT_encoding
178 .byte 11 # DW_FORM_data1
179 .byte 11 # DW_AT_byte_size
180 .byte 11 # DW_FORM_data1
183 .byte 6 # Abbreviation Code
184 .byte 15 # DW_TAG_pointer_type
185 .byte 0 # DW_CHILDREN_no
186 .byte 73 # DW_AT_type
187 .byte 19 # DW_FORM_ref4
190 .byte 7 # Abbreviation Code
191 .byte 38 # DW_TAG_const_type
192 .byte 0 # DW_CHILDREN_no
193 .byte 73 # DW_AT_type
194 .byte 19 # DW_FORM_ref4
198 .section .debug_info,"",@progbits
200 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
202 .short 5 # DWARF version number
203 .byte 1 # DWARF Unit Type
204 .byte 8 # Address Size (in bytes)
205 .long .debug_abbrev # Offset Into Abbrev. Section
206 .byte 1 # Abbrev [1] 0xc:0x79 DW_TAG_compile_unit
207 .byte 0 # DW_AT_producer
208 .short 33 # DW_AT_language
210 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
211 .long .Lline_table_start0 # DW_AT_stmt_list
212 .byte 2 # DW_AT_comp_dir
213 .quad 0 # DW_AT_low_pc
214 .byte 0 # DW_AT_ranges
215 .long .Laddr_table_base0 # DW_AT_addr_base
216 .long .Lrnglists_table_base0 # DW_AT_rnglists_base
217 .byte 2 # Abbrev [2] 0x2b:0x1c DW_TAG_subprogram
218 .byte 1 # DW_AT_ranges
219 .byte 1 # DW_AT_frame_base
221 .byte 3 # DW_AT_linkage_name
223 .byte 0 # DW_AT_decl_file
224 .byte 1 # DW_AT_decl_line
225 .long 109 # DW_AT_type
227 .byte 3 # Abbrev [3] 0x3b:0xb DW_TAG_formal_parameter
228 .byte 2 # DW_AT_location
232 .byte 0 # DW_AT_decl_file
233 .byte 1 # DW_AT_decl_line
234 .long 109 # DW_AT_type
235 .byte 0 # End Of Children Mark
236 .byte 4 # Abbrev [4] 0x47:0x26 DW_TAG_subprogram
237 .byte 1 # DW_AT_low_pc
238 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
239 .byte 1 # DW_AT_frame_base
242 .byte 0 # DW_AT_decl_file
243 .byte 7 # DW_AT_decl_line
244 .long 109 # DW_AT_type
246 .byte 3 # Abbrev [3] 0x56:0xb DW_TAG_formal_parameter
247 .byte 2 # DW_AT_location
251 .byte 0 # DW_AT_decl_file
252 .byte 7 # DW_AT_decl_line
253 .long 109 # DW_AT_type
254 .byte 3 # Abbrev [3] 0x61:0xb DW_TAG_formal_parameter
255 .byte 2 # DW_AT_location
259 .byte 0 # DW_AT_decl_file
260 .byte 7 # DW_AT_decl_line
261 .long 105 # DW_AT_type
262 .byte 0 # End Of Children Mark
263 .byte 5 # Abbrev [5] 0x6d:0x4 DW_TAG_base_type
265 .byte 5 # DW_AT_encoding
266 .byte 4 # DW_AT_byte_size
267 .byte 6 # Abbrev [6] 0x71:0x5 DW_TAG_pointer_type
268 .long 114 # DW_AT_type
269 .byte 6 # Abbrev [6] 0x76:0x5 DW_TAG_pointer_type
270 .long 119 # DW_AT_type
271 .byte 7 # Abbrev [7] 0x7b:0x5 DW_TAG_const_type
272 .long 124 # DW_AT_type
273 .byte 5 # Abbrev [5] 0x80:0x4 DW_TAG_base_type
274 .byte 10 # DW_AT_name
275 .byte 6 # DW_AT_encoding
276 .byte 1 # DW_AT_byte_size
277 .byte 0 # End Of Children Mark
279 .section .debug_rnglists,"",@progbits
280 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
281 .Ldebug_list_header_start0:
283 .byte 8 # Address size
284 .byte 0 # Segment selector size
285 .long 1 # Offset entry count
286 .Lrnglists_table_base0:
287 .long .Ldebug_ranges0-.Lrnglists_table_base0
288 .long .Ldebug_ranges1-.Lrnglists_table_base0
290 .byte 3 # DW_RLE_startx_length
291 .byte 0 # start index
292 .uleb128 .Lfunc_end0-.Lfunc_begin0 # length
293 .byte 3 # DW_RLE_startx_length
294 .byte 1 # start index
295 .uleb128 .Lfunc_end1-.Lfunc_begin1 # length
296 .byte 0 # DW_RLE_end_of_list
298 .byte 3 # DW_RLE_startx_length
299 .byte 2 # start index
300 .uleb128 .Lfunc_end0-.Lfunc_begin0 # length
301 .byte 0 # DW_RLE_end_of_list
302 .Ldebug_list_header_end0:
303 .section .debug_str_offsets,"",@progbits
304 .long 48 # Length of String Offsets Set
308 .section .debug_str,"MS",@progbits,1
310 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=0
312 .asciz "main.cpp" # string offset=105
314 .asciz "/subprogramRanges" # string offset=114
316 .asciz "_Z7doStuffi" # string offset=169
318 .asciz "doStuff" # string offset=181
320 .asciz "int" # string offset=189
322 .asciz "main" # string offset=193
324 .asciz "val" # string offset=198
326 .asciz "argc" # string offset=202
328 .asciz "argv" # string offset=207
330 .asciz "char" # string offset=212
331 .section .debug_str_offsets,"",@progbits
342 .long .Linfo_string10
343 .section .debug_addr,"",@progbits
344 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
346 .short 5 # DWARF version number
347 .byte 8 # Address size
348 .byte 0 # Segment selector size
354 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"
355 .section ".note.GNU-stack","",@progbits
357 .addrsig_sym _Z7doStuffi
358 .section .debug_line,"",@progbits