1 # clang++ -ffunction-sections -g2 -gdwarf-4
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 1 "/subprogramRanges" "main.cpp"
22 .loc 1 1 0 # main.cpp:1:0
26 .cfi_def_cfa_offset 16
29 .cfi_def_cfa_register %rbp
32 .loc 1 2 7 prologue_end # main.cpp:2:7
35 .loc 1 2 7 is_stmt 0 # main.cpp:2:7
39 .loc 1 3 5 is_stmt 1 # main.cpp:3:5
45 .loc 1 4 10 # main.cpp:4:10
47 .loc 1 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 1 7 0 is_stmt 1 # main.cpp:7:0
66 .cfi_def_cfa_offset 16
69 .cfi_def_cfa_register %rbp
75 .loc 1 8 21 prologue_end # main.cpp:8:21
77 .loc 1 8 13 is_stmt 0 # main.cpp:8:13
79 .loc 1 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 14 # DW_FORM_strp
95 .byte 19 # DW_AT_language
96 .byte 5 # DW_FORM_data2
98 .byte 14 # DW_FORM_strp
99 .byte 16 # DW_AT_stmt_list
100 .byte 23 # DW_FORM_sec_offset
101 .byte 27 # DW_AT_comp_dir
102 .byte 14 # DW_FORM_strp
103 .byte 17 # DW_AT_low_pc
104 .byte 1 # DW_FORM_addr
105 .byte 85 # DW_AT_ranges
106 .byte 23 # DW_FORM_sec_offset
109 .byte 2 # Abbreviation Code
110 .byte 46 # DW_TAG_subprogram
111 .byte 1 # DW_CHILDREN_yes
112 .byte 85 # DW_AT_ranges
113 .byte 23 # DW_FORM_sec_offset
114 .byte 64 # DW_AT_frame_base
115 .byte 24 # DW_FORM_exprloc
116 .byte 110 # DW_AT_linkage_name
117 .byte 14 # DW_FORM_strp
119 .byte 14 # DW_FORM_strp
120 .byte 58 # DW_AT_decl_file
121 .byte 11 # DW_FORM_data1
122 .byte 59 # DW_AT_decl_line
123 .byte 11 # DW_FORM_data1
124 .byte 73 # DW_AT_type
125 .byte 19 # DW_FORM_ref4
126 .byte 63 # DW_AT_external
127 .byte 25 # DW_FORM_flag_present
130 .byte 3 # Abbreviation Code
131 .byte 5 # DW_TAG_formal_parameter
132 .byte 0 # DW_CHILDREN_no
133 .byte 2 # DW_AT_location
134 .byte 24 # DW_FORM_exprloc
136 .byte 14 # DW_FORM_strp
137 .byte 58 # DW_AT_decl_file
138 .byte 11 # DW_FORM_data1
139 .byte 59 # DW_AT_decl_line
140 .byte 11 # DW_FORM_data1
141 .byte 73 # DW_AT_type
142 .byte 19 # DW_FORM_ref4
145 .byte 4 # Abbreviation Code
146 .byte 46 # DW_TAG_subprogram
147 .byte 1 # DW_CHILDREN_yes
148 .byte 17 # DW_AT_low_pc
149 .byte 1 # DW_FORM_addr
150 .byte 18 # DW_AT_high_pc
151 .byte 6 # DW_FORM_data4
152 .byte 64 # DW_AT_frame_base
153 .byte 24 # DW_FORM_exprloc
155 .byte 14 # DW_FORM_strp
156 .byte 58 # DW_AT_decl_file
157 .byte 11 # DW_FORM_data1
158 .byte 59 # DW_AT_decl_line
159 .byte 11 # DW_FORM_data1
160 .byte 73 # DW_AT_type
161 .byte 19 # DW_FORM_ref4
162 .byte 63 # DW_AT_external
163 .byte 25 # DW_FORM_flag_present
166 .byte 5 # Abbreviation Code
167 .byte 36 # DW_TAG_base_type
168 .byte 0 # DW_CHILDREN_no
170 .byte 14 # DW_FORM_strp
171 .byte 62 # DW_AT_encoding
172 .byte 11 # DW_FORM_data1
173 .byte 11 # DW_AT_byte_size
174 .byte 11 # DW_FORM_data1
177 .byte 6 # Abbreviation Code
178 .byte 15 # DW_TAG_pointer_type
179 .byte 0 # DW_CHILDREN_no
180 .byte 73 # DW_AT_type
181 .byte 19 # DW_FORM_ref4
184 .byte 7 # Abbreviation Code
185 .byte 38 # DW_TAG_const_type
186 .byte 0 # DW_CHILDREN_no
187 .byte 73 # DW_AT_type
188 .byte 19 # DW_FORM_ref4
192 .section .debug_info,"",@progbits
194 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
196 .short 4 # DWARF version number
197 .long .debug_abbrev # Offset Into Abbrev. Section
198 .byte 8 # Address Size (in bytes)
199 .byte 1 # Abbrev [1] 0xb:0x9f DW_TAG_compile_unit
200 .long .Linfo_string0 # DW_AT_producer
201 .short 33 # DW_AT_language
202 .long .Linfo_string1 # DW_AT_name
203 .long .Lline_table_start0 # DW_AT_stmt_list
204 .long .Linfo_string2 # DW_AT_comp_dir
205 .quad 0 # DW_AT_low_pc
206 .long .Ldebug_ranges0 # DW_AT_ranges
207 .byte 2 # Abbrev [2] 0x2a:0x2c DW_TAG_subprogram
208 .long .Ldebug_ranges1 # DW_AT_ranges
209 .byte 1 # DW_AT_frame_base
211 .long .Linfo_string3 # DW_AT_linkage_name
212 .long .Linfo_string4 # DW_AT_name
213 .byte 1 # DW_AT_decl_file
214 .byte 1 # DW_AT_decl_line
215 .long 132 # DW_AT_type
217 .byte 3 # Abbrev [3] 0x47:0xe DW_TAG_formal_parameter
218 .byte 2 # DW_AT_location
221 .long .Linfo_string7 # DW_AT_name
222 .byte 1 # DW_AT_decl_file
223 .byte 1 # DW_AT_decl_line
224 .long 132 # DW_AT_type
225 .byte 0 # End Of Children Mark
226 .byte 4 # Abbrev [4] 0x56:0x36 DW_TAG_subprogram
227 .quad .Lfunc_begin1 # DW_AT_low_pc
228 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
229 .byte 1 # DW_AT_frame_base
231 .long .Linfo_string6 # DW_AT_name
232 .byte 1 # DW_AT_decl_file
233 .byte 7 # DW_AT_decl_line
234 .long 132 # DW_AT_type
236 .byte 3 # Abbrev [3] 0x6f:0xe DW_TAG_formal_parameter
237 .byte 2 # DW_AT_location
240 .long .Linfo_string8 # DW_AT_name
241 .byte 1 # DW_AT_decl_file
242 .byte 7 # DW_AT_decl_line
243 .long 132 # DW_AT_type
244 .byte 3 # Abbrev [3] 0x7d:0xe DW_TAG_formal_parameter
245 .byte 2 # DW_AT_location
248 .long .Linfo_string9 # DW_AT_name
249 .byte 1 # DW_AT_decl_file
250 .byte 7 # DW_AT_decl_line
251 .long 144 # DW_AT_type
252 .byte 0 # End Of Children Mark
253 .byte 5 # Abbrev [5] 0x8c:0x7 DW_TAG_base_type
254 .long .Linfo_string5 # DW_AT_name
255 .byte 5 # DW_AT_encoding
256 .byte 4 # DW_AT_byte_size
257 .byte 6 # Abbrev [6] 0x93:0x5 DW_TAG_pointer_type
258 .long 144 # DW_AT_type
259 .byte 6 # Abbrev [6] 0x98:0x5 DW_TAG_pointer_type
260 .long 149 # DW_AT_type
261 .byte 7 # Abbrev [7] 0x9d:0x5 DW_TAG_const_type
262 .long 154 # DW_AT_type
263 .byte 5 # Abbrev [5] 0xa2:0x7 DW_TAG_base_type
264 .long .Linfo_string10 # DW_AT_name
265 .byte 6 # DW_AT_encoding
266 .byte 1 # DW_AT_byte_size
267 .byte 0 # End Of Children Mark
269 .section .debug_ranges,"",@progbits
282 .section .debug_str,"MS",@progbits,1
284 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=0
286 .asciz "main.cpp" # string offset=105
288 .asciz "/subprogramRanges" # string offset=114
290 .asciz "_Z7doStuffi" # string offset=169
292 .asciz "doStuff" # string offset=181
294 .asciz "int" # string offset=189
296 .asciz "main" # string offset=193
298 .asciz "val" # string offset=198
300 .asciz "argc" # string offset=202
302 .asciz "argv" # string offset=207
304 .asciz "char" # string offset=212
305 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"
306 .section ".note.GNU-stack","",@progbits
308 .addrsig_sym _Z7doStuffi
309 .section .debug_line,"",@progbits