brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.3 KiB · 9bbb36f Raw
352 lines · plain
1## Check that the --debug-vars option works for simple register locations, when2## using DWARF4 debug info, with functions in multiple sections.3 4## Generated with this compile command, with the source code in Inputs/debug.c:5## clang --target=arm--none-eabi -march=armv7-a -c debug.c -O1 -gdwarf-4 -S -o - -ffunction-sections6 7# RUN: llvm-mc -triple armv8a--none-eabi < %s -filetype=obj | \8# RUN:     llvm-objdump - -d --debug-vars --no-show-raw-insn | \9# RUN:     FileCheck %s10 11# CHECK: Disassembly of section .text.foo:12# CHECK-EMPTY:13# CHECK-NEXT: 00000000 <foo>:14# CHECK-NEXT:                                                                   ┠─ a = R015# CHECK-NEXT:                                                                   ┃ ┠─ b = R116# CHECK-NEXT:                                                                   ┃ ┃ ┠─ c = R217# CHECK-NEXT:                                                                   ┃ ┃ ┃ ┌─ x = R018# CHECK-NEXT:        0:       add     r0, r1, r0                                ┻ ┃ ┃ ╈19# CHECK-NEXT:                                                                   ┌─ y = R020# CHECK-NEXT:        4:       add     r0, r0, r2                                ╈ ┃ ┃ ┻21# CHECK-NEXT:        8:       bx      lr                                        ┻ ┻ ┻22# CHECK-EMPTY:23# CHECK-NEXT: Disassembly of section .text.bar:24# CHECK-EMPTY:25# CHECK-NEXT: 00000000 <bar>:26# CHECK-NEXT:                                                                   ┠─ a = R027# CHECK-NEXT:        0:       add     r0, r0, #1                                ┃28# CHECK-NEXT:        4:       bx      lr                                        ┻29 30	.text31	.syntax unified32	.eabi_attribute	67, "2.09"33	.eabi_attribute	6, 1034	.eabi_attribute	7, 6535	.eabi_attribute	8, 136	.eabi_attribute	9, 237	.fpu	neon38	.eabi_attribute	34, 039	.eabi_attribute	17, 140	.eabi_attribute	20, 141	.eabi_attribute	21, 142	.eabi_attribute	23, 343	.eabi_attribute	24, 144	.eabi_attribute	25, 145	.eabi_attribute	38, 146	.eabi_attribute	18, 447	.eabi_attribute	26, 248	.eabi_attribute	14, 049	.file	"debug.c"50	.section	.text.foo,"ax",%progbits51	.globl	foo52	.p2align	253	.type	foo,%function54	.code	3255foo:56.Lfunc_begin0:57	.file	1 "/work" "llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c"58	.loc	1 1 059	.fnstart60	.cfi_sections .debug_frame61	.cfi_startproc62	.loc	1 2 13 prologue_end63	add	r0, r1, r064.Ltmp0:65	.loc	1 3 1366	add	r0, r0, r267.Ltmp1:68	.loc	1 4 369	bx	lr70.Ltmp2:71.Lfunc_end0:72	.size	foo, .Lfunc_end0-foo73	.cfi_endproc74	.cantunwind75	.fnend76 77	.section	.text.bar,"ax",%progbits78	.globl	bar79	.p2align	280	.type	bar,%function81	.code	3282bar:83.Lfunc_begin1:84	.loc	1 7 085	.fnstart86	.cfi_startproc87	.loc	1 8 4 prologue_end88	add	r0, r0, #189.Ltmp3:90	.loc	1 9 391	bx	lr92.Ltmp4:93.Lfunc_end1:94	.size	bar, .Lfunc_end1-bar95	.cfi_endproc96	.cantunwind97	.fnend98 99	.section	.debug_str,"MS",%progbits,1100.Linfo_string0:101	.asciz	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"102.Linfo_string1:103	.asciz	"/work/llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c"104.Linfo_string2:105	.asciz	"/work/scratch"106.Linfo_string3:107	.asciz	"foo"108.Linfo_string4:109	.asciz	"int"110.Linfo_string5:111	.asciz	"bar"112.Linfo_string6:113	.asciz	"a"114.Linfo_string7:115	.asciz	"b"116.Linfo_string8:117	.asciz	"c"118.Linfo_string9:119	.asciz	"x"120.Linfo_string10:121	.asciz	"y"122	.section	.debug_loc,"",%progbits123.Ldebug_loc0:124	.long	-1125	.long	.Lfunc_begin0126	.long	.Lfunc_begin0-.Lfunc_begin0127	.long	.Ltmp0-.Lfunc_begin0128	.short	1129	.byte	80130	.long	0131	.long	0132.Ldebug_loc1:133	.long	-1134	.long	.Lfunc_begin0135	.long	.Ltmp0-.Lfunc_begin0136	.long	.Ltmp1-.Lfunc_begin0137	.short	1138	.byte	80139	.long	0140	.long	0141.Ldebug_loc2:142	.long	-1143	.long	.Lfunc_begin0144	.long	.Ltmp1-.Lfunc_begin0145	.long	.Lfunc_end0-.Lfunc_begin0146	.short	1147	.byte	80148	.long	0149	.long	0150	.section	.debug_abbrev,"",%progbits151	.byte	1152	.byte	17153	.byte	1154	.byte	37155	.byte	14156	.byte	19157	.byte	5158	.byte	3159	.byte	14160	.byte	16161	.byte	23162	.byte	27163	.byte	14164	.byte	17165	.byte	1166	.byte	85167	.byte	23168	.byte	0169	.byte	0170	.byte	2171	.byte	46172	.byte	1173	.byte	17174	.byte	1175	.byte	18176	.byte	6177	.byte	64178	.byte	24179	.ascii	"\227B"180	.byte	25181	.byte	3182	.byte	14183	.byte	58184	.byte	11185	.byte	59186	.byte	11187	.byte	39188	.byte	25189	.byte	73190	.byte	19191	.byte	63192	.byte	25193	.byte	0194	.byte	0195	.byte	3196	.byte	5197	.byte	0198	.byte	2199	.byte	23200	.byte	3201	.byte	14202	.byte	58203	.byte	11204	.byte	59205	.byte	11206	.byte	73207	.byte	19208	.byte	0209	.byte	0210	.byte	4211	.byte	5212	.byte	0213	.byte	2214	.byte	24215	.byte	3216	.byte	14217	.byte	58218	.byte	11219	.byte	59220	.byte	11221	.byte	73222	.byte	19223	.byte	0224	.byte	0225	.byte	5226	.byte	52227	.byte	0228	.byte	2229	.byte	23230	.byte	3231	.byte	14232	.byte	58233	.byte	11234	.byte	59235	.byte	11236	.byte	73237	.byte	19238	.byte	0239	.byte	0240	.byte	6241	.byte	36242	.byte	0243	.byte	3244	.byte	14245	.byte	62246	.byte	11247	.byte	11248	.byte	11249	.byte	0250	.byte	0251	.byte	0252	.section	.debug_info,"",%progbits253.Lcu_begin0:254	.long	.Ldebug_info_end0-.Ldebug_info_start0255.Ldebug_info_start0:256	.short	4257	.long	.debug_abbrev258	.byte	4259	.byte	1260	.long	.Linfo_string0261	.short	12262	.long	.Linfo_string1263	.long	.Lline_table_start0264	.long	.Linfo_string2265	.long	0266	.long	.Ldebug_ranges0267	.byte	2268	.long	.Lfunc_begin0269	.long	.Lfunc_end0-.Lfunc_begin0270	.byte	1271	.byte	91272 273	.long	.Linfo_string3274	.byte	1275	.byte	1276 277	.long	166278 279	.byte	3280	.long	.Ldebug_loc0281	.long	.Linfo_string6282	.byte	1283	.byte	1284	.long	166285	.byte	4286	.byte	1287	.byte	81288	.long	.Linfo_string7289	.byte	1290	.byte	1291	.long	166292	.byte	4293	.byte	1294	.byte	82295	.long	.Linfo_string8296	.byte	1297	.byte	1298	.long	166299	.byte	5300	.long	.Ldebug_loc1301	.long	.Linfo_string9302	.byte	1303	.byte	2304	.long	166305	.byte	5306	.long	.Ldebug_loc2307	.long	.Linfo_string10308	.byte	1309	.byte	3310	.long	166311	.byte	0312	.byte	2313	.long	.Lfunc_begin1314	.long	.Lfunc_end1-.Lfunc_begin1315	.byte	1316	.byte	91317 318	.long	.Linfo_string5319	.byte	1320	.byte	7321 322	.long	166323 324	.byte	4325	.byte	1326	.byte	80327	.long	.Linfo_string6328	.byte	1329	.byte	7330	.long	166331	.byte	0332	.byte	6333	.long	.Linfo_string4334	.byte	5335	.byte	4336	.byte	0337.Ldebug_info_end0:338	.section	.debug_ranges,"",%progbits339.Ldebug_ranges0:340	.long	.Lfunc_begin0341	.long	.Lfunc_end0342	.long	.Lfunc_begin1343	.long	.Lfunc_end1344	.long	0345	.long	0346	.ident	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"347	.section	".note.GNU-stack","",%progbits348	.addrsig349	.eabi_attribute	30, 1350	.section	.debug_line,"",%progbits351.Lline_table_start0:352