brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.2 KiB · dce14ed Raw
311 lines · plain
1# clang++ -ffunction-sections -g2 -gdwarf-42# 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) {5#   if (val)6#     ++val;7#   return val;8# }9#10# int main(int argc, const char** argv) {11#     return  doStuff(argc);12# }13	.text14	.file	"main.cpp"15	.section	.text._Z7doStuffi,"ax",@progbits16	.globl	_Z7doStuffi                     # -- Begin function _Z7doStuffi17	.p2align	4, 0x9018	.type	_Z7doStuffi,@function19_Z7doStuffi:                            # @_Z7doStuffi20.Lfunc_begin0:21	.file	1 "/subprogramRanges" "main.cpp"22	.loc	1 1 0                           # main.cpp:1:023	.cfi_startproc24# %bb.0:                                # %entry25	pushq	%rbp26	.cfi_def_cfa_offset 1627	.cfi_offset %rbp, -1628	movq	%rsp, %rbp29	.cfi_def_cfa_register %rbp30	movl	%edi, -4(%rbp)31.Ltmp0:32	.loc	1 2 7 prologue_end              # main.cpp:2:733	cmpl	$0, -4(%rbp)34.Ltmp1:35	.loc	1 2 7 is_stmt 0                 # main.cpp:2:736	je	.LBB0_237# %bb.1:                                # %if.then38.Ltmp2:39	.loc	1 3 5 is_stmt 1                 # main.cpp:3:540	movl	-4(%rbp), %eax41	addl	$1, %eax42	movl	%eax, -4(%rbp)43.Ltmp3:44.LBB0_2:                                # %if.end45	.loc	1 4 10                          # main.cpp:4:1046	movl	-4(%rbp), %eax47	.loc	1 4 3 epilogue_begin is_stmt 0  # main.cpp:4:348	popq	%rbp49	.cfi_def_cfa %rsp, 850	retq51.Ltmp4:52.Lfunc_end0:53	.size	_Z7doStuffi, .Lfunc_end0-_Z7doStuffi54	.cfi_endproc55                                        # -- End function56	.section	.text.main,"ax",@progbits57	.globl	main                            # -- Begin function main58	.p2align	4, 0x9059	.type	main,@function60main:                                   # @main61.Lfunc_begin1:62	.loc	1 7 0 is_stmt 1                 # main.cpp:7:063	.cfi_startproc64# %bb.0:                                # %entry65	pushq	%rbp66	.cfi_def_cfa_offset 1667	.cfi_offset %rbp, -1668	movq	%rsp, %rbp69	.cfi_def_cfa_register %rbp70	subq	$16, %rsp71	movl	$0, -4(%rbp)72	movl	%edi, -8(%rbp)73	movq	%rsi, -16(%rbp)74.Ltmp5:75	.loc	1 8 21 prologue_end             # main.cpp:8:2176	movl	-8(%rbp), %edi77	.loc	1 8 13 is_stmt 0                # main.cpp:8:1378	callq	_Z7doStuffi79	.loc	1 8 5 epilogue_begin            # main.cpp:8:580	addq	$16, %rsp81	popq	%rbp82	.cfi_def_cfa %rsp, 883	retq84.Ltmp6:85.Lfunc_end1:86	.size	main, .Lfunc_end1-main87	.cfi_endproc88                                        # -- End function89	.section	.debug_abbrev,"",@progbits90	.byte	1                               # Abbreviation Code91	.byte	17                              # DW_TAG_compile_unit92	.byte	1                               # DW_CHILDREN_yes93	.byte	37                              # DW_AT_producer94	.byte	14                              # DW_FORM_strp95	.byte	19                              # DW_AT_language96	.byte	5                               # DW_FORM_data297	.byte	3                               # DW_AT_name98	.byte	14                              # DW_FORM_strp99	.byte	16                              # DW_AT_stmt_list100	.byte	23                              # DW_FORM_sec_offset101	.byte	27                              # DW_AT_comp_dir102	.byte	14                              # DW_FORM_strp103	.byte	17                              # DW_AT_low_pc104	.byte	1                               # DW_FORM_addr105	.byte	85                              # DW_AT_ranges106	.byte	23                              # DW_FORM_sec_offset107	.byte	0                               # EOM(1)108	.byte	0                               # EOM(2)109	.byte	2                               # Abbreviation Code110	.byte	46                              # DW_TAG_subprogram111	.byte	1                               # DW_CHILDREN_yes112	.byte	85                              # DW_AT_ranges113	.byte	23                              # DW_FORM_sec_offset114	.byte	64                              # DW_AT_frame_base115	.byte	24                              # DW_FORM_exprloc116	.byte	110                             # DW_AT_linkage_name117	.byte	14                              # DW_FORM_strp118	.byte	3                               # DW_AT_name119	.byte	14                              # DW_FORM_strp120	.byte	58                              # DW_AT_decl_file121	.byte	11                              # DW_FORM_data1122	.byte	59                              # DW_AT_decl_line123	.byte	11                              # DW_FORM_data1124	.byte	73                              # DW_AT_type125	.byte	19                              # DW_FORM_ref4126	.byte	63                              # DW_AT_external127	.byte	25                              # DW_FORM_flag_present128	.byte	0                               # EOM(1)129	.byte	0                               # EOM(2)130	.byte	3                               # Abbreviation Code131	.byte	5                               # DW_TAG_formal_parameter132	.byte	0                               # DW_CHILDREN_no133	.byte	2                               # DW_AT_location134	.byte	24                              # DW_FORM_exprloc135	.byte	3                               # DW_AT_name136	.byte	14                              # DW_FORM_strp137	.byte	58                              # DW_AT_decl_file138	.byte	11                              # DW_FORM_data1139	.byte	59                              # DW_AT_decl_line140	.byte	11                              # DW_FORM_data1141	.byte	73                              # DW_AT_type142	.byte	19                              # DW_FORM_ref4143	.byte	0                               # EOM(1)144	.byte	0                               # EOM(2)145	.byte	4                               # Abbreviation Code146	.byte	46                              # DW_TAG_subprogram147	.byte	1                               # DW_CHILDREN_yes148	.byte	17                              # DW_AT_low_pc149	.byte	1                               # DW_FORM_addr150	.byte	18                              # DW_AT_high_pc151	.byte	6                               # DW_FORM_data4152	.byte	64                              # DW_AT_frame_base153	.byte	24                              # DW_FORM_exprloc154	.byte	3                               # DW_AT_name155	.byte	14                              # DW_FORM_strp156	.byte	58                              # DW_AT_decl_file157	.byte	11                              # DW_FORM_data1158	.byte	59                              # DW_AT_decl_line159	.byte	11                              # DW_FORM_data1160	.byte	73                              # DW_AT_type161	.byte	19                              # DW_FORM_ref4162	.byte	63                              # DW_AT_external163	.byte	25                              # DW_FORM_flag_present164	.byte	0                               # EOM(1)165	.byte	0                               # EOM(2)166	.byte	5                               # Abbreviation Code167	.byte	36                              # DW_TAG_base_type168	.byte	0                               # DW_CHILDREN_no169	.byte	3                               # DW_AT_name170	.byte	14                              # DW_FORM_strp171	.byte	62                              # DW_AT_encoding172	.byte	11                              # DW_FORM_data1173	.byte	11                              # DW_AT_byte_size174	.byte	11                              # DW_FORM_data1175	.byte	0                               # EOM(1)176	.byte	0                               # EOM(2)177	.byte	6                               # Abbreviation Code178	.byte	15                              # DW_TAG_pointer_type179	.byte	0                               # DW_CHILDREN_no180	.byte	73                              # DW_AT_type181	.byte	19                              # DW_FORM_ref4182	.byte	0                               # EOM(1)183	.byte	0                               # EOM(2)184	.byte	7                               # Abbreviation Code185	.byte	38                              # DW_TAG_const_type186	.byte	0                               # DW_CHILDREN_no187	.byte	73                              # DW_AT_type188	.byte	19                              # DW_FORM_ref4189	.byte	0                               # EOM(1)190	.byte	0                               # EOM(2)191	.byte	0                               # EOM(3)192	.section	.debug_info,"",@progbits193.Lcu_begin0:194	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit195.Ldebug_info_start0:196	.short	4                               # DWARF version number197	.long	.debug_abbrev                   # Offset Into Abbrev. Section198	.byte	8                               # Address Size (in bytes)199	.byte	1                               # Abbrev [1] 0xb:0x9f DW_TAG_compile_unit200	.long	.Linfo_string0                  # DW_AT_producer201	.short	33                              # DW_AT_language202	.long	.Linfo_string1                  # DW_AT_name203	.long	.Lline_table_start0             # DW_AT_stmt_list204	.long	.Linfo_string2                  # DW_AT_comp_dir205	.quad	0                               # DW_AT_low_pc206	.long	.Ldebug_ranges0                 # DW_AT_ranges207	.byte	2                               # Abbrev [2] 0x2a:0x2c DW_TAG_subprogram208	.long	.Ldebug_ranges1                 # DW_AT_ranges209	.byte	1                               # DW_AT_frame_base210	.byte	86211	.long	.Linfo_string3                  # DW_AT_linkage_name212	.long	.Linfo_string4                  # DW_AT_name213	.byte	1                               # DW_AT_decl_file214	.byte	1                               # DW_AT_decl_line215	.long	132                             # DW_AT_type216                                        # DW_AT_external217	.byte	3                               # Abbrev [3] 0x47:0xe DW_TAG_formal_parameter218	.byte	2                               # DW_AT_location219	.byte	145220	.byte	124221	.long	.Linfo_string7                  # DW_AT_name222	.byte	1                               # DW_AT_decl_file223	.byte	1                               # DW_AT_decl_line224	.long	132                             # DW_AT_type225	.byte	0                               # End Of Children Mark226	.byte	4                               # Abbrev [4] 0x56:0x36 DW_TAG_subprogram227	.quad	.Lfunc_begin1                   # DW_AT_low_pc228	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc229	.byte	1                               # DW_AT_frame_base230	.byte	86231	.long	.Linfo_string6                  # DW_AT_name232	.byte	1                               # DW_AT_decl_file233	.byte	7                               # DW_AT_decl_line234	.long	132                             # DW_AT_type235                                        # DW_AT_external236	.byte	3                               # Abbrev [3] 0x6f:0xe DW_TAG_formal_parameter237	.byte	2                               # DW_AT_location238	.byte	145239	.byte	120240	.long	.Linfo_string8                  # DW_AT_name241	.byte	1                               # DW_AT_decl_file242	.byte	7                               # DW_AT_decl_line243	.long	132                             # DW_AT_type244	.byte	3                               # Abbrev [3] 0x7d:0xe DW_TAG_formal_parameter245	.byte	2                               # DW_AT_location246	.byte	145247	.byte	112248	.long	.Linfo_string9                  # DW_AT_name249	.byte	1                               # DW_AT_decl_file250	.byte	7                               # DW_AT_decl_line251	.long	144                             # DW_AT_type252	.byte	0                               # End Of Children Mark253	.byte	5                               # Abbrev [5] 0x8c:0x7 DW_TAG_base_type254	.long	.Linfo_string5                  # DW_AT_name255	.byte	5                               # DW_AT_encoding256	.byte	4                               # DW_AT_byte_size257	.byte	6                               # Abbrev [6] 0x93:0x5 DW_TAG_pointer_type258	.long	144                             # DW_AT_type259	.byte	6                               # Abbrev [6] 0x98:0x5 DW_TAG_pointer_type260	.long	149                             # DW_AT_type261	.byte	7                               # Abbrev [7] 0x9d:0x5 DW_TAG_const_type262	.long	154                             # DW_AT_type263	.byte	5                               # Abbrev [5] 0xa2:0x7 DW_TAG_base_type264	.long	.Linfo_string10                 # DW_AT_name265	.byte	6                               # DW_AT_encoding266	.byte	1                               # DW_AT_byte_size267	.byte	0                               # End Of Children Mark268.Ldebug_info_end0:269	.section	.debug_ranges,"",@progbits270.Ldebug_ranges0:271	.quad	.Lfunc_begin0272	.quad	.Lfunc_end0273	.quad	.Lfunc_begin1274	.quad	.Lfunc_end1275	.quad	0276	.quad	0277.Ldebug_ranges1:278	.quad	0279	.quad	.Lfunc_end0280	.quad	0281	.quad	0282	.section	.debug_str,"MS",@progbits,1283.Linfo_string0:284	.asciz	"clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=0285.Linfo_string1:286	.asciz	"main.cpp"                      # string offset=105287.Linfo_string2:288	.asciz	"/subprogramRanges" # string offset=114289.Linfo_string3:290	.asciz	"_Z7doStuffi"                   # string offset=169291.Linfo_string4:292	.asciz	"doStuff"                       # string offset=181293.Linfo_string5:294	.asciz	"int"                           # string offset=189295.Linfo_string6:296	.asciz	"main"                          # string offset=193297.Linfo_string7:298	.asciz	"val"                           # string offset=198299.Linfo_string8:300	.asciz	"argc"                          # string offset=202301.Linfo_string9:302	.asciz	"argv"                          # string offset=207303.Linfo_string10:304	.asciz	"char"                          # string offset=212305	.ident	"clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"306	.section	".note.GNU-stack","",@progbits307	.addrsig308	.addrsig_sym _Z7doStuffi309	.section	.debug_line,"",@progbits310.Lline_table_start0:311