brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.5 KiB · a9e08ff Raw
412 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-5 -S -o - -ffunction-sections6 7# RUN: llvm-mc -triple armv8a--none-eabi < %s -filetype=obj --dwarf-version=5 | \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	0 "/work/scratch" "/work/llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c" md5 0x07374f01ab24ec7c07db73bc13bd778e58	.file	1 "/work" "llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c" md5 0x07374f01ab24ec7c07db73bc13bd778e59	.loc	1 1 060	.fnstart61	.cfi_sections .debug_frame62	.cfi_startproc63	.loc	1 2 13 prologue_end64	add	r0, r1, r065.Ltmp0:66	.loc	1 3 1367	add	r0, r0, r268.Ltmp1:69	.loc	1 4 370	bx	lr71.Ltmp2:72.Lfunc_end0:73	.size	foo, .Lfunc_end0-foo74	.cfi_endproc75	.cantunwind76	.fnend77 78	.section	.text.bar,"ax",%progbits79	.globl	bar80	.p2align	281	.type	bar,%function82	.code	3283bar:84.Lfunc_begin1:85	.loc	1 7 086	.fnstart87	.cfi_startproc88	.loc	1 8 4 prologue_end89	add	r0, r0, #190.Ltmp3:91	.loc	1 9 392	bx	lr93.Ltmp4:94.Lfunc_end1:95	.size	bar, .Lfunc_end1-bar96	.cfi_endproc97	.cantunwind98	.fnend99 100	.section	.debug_str_offsets,"",%progbits101	.long	48102	.short	5103	.short	0104.Lstr_offsets_base0:105	.section	.debug_str,"MS",%progbits,1106.Linfo_string0:107	.asciz	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"108.Linfo_string1:109	.asciz	"/work/llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c"110.Linfo_string2:111	.asciz	"/work/scratch"112.Linfo_string3:113	.asciz	"foo"114.Linfo_string4:115	.asciz	"int"116.Linfo_string5:117	.asciz	"bar"118.Linfo_string6:119	.asciz	"a"120.Linfo_string7:121	.asciz	"b"122.Linfo_string8:123	.asciz	"c"124.Linfo_string9:125	.asciz	"x"126.Linfo_string10:127	.asciz	"y"128	.section	.debug_str_offsets,"",%progbits129	.long	.Linfo_string0130	.long	.Linfo_string1131	.long	.Linfo_string2132	.long	.Linfo_string3133	.long	.Linfo_string4134	.long	.Linfo_string5135	.long	.Linfo_string6136	.long	.Linfo_string7137	.long	.Linfo_string8138	.long	.Linfo_string9139	.long	.Linfo_string10140	.section	.debug_loclists,"",%progbits141	.long	.Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0142.Ldebug_loclist_table_start0:143	.short	5144	.byte	4145	.byte	0146	.long	3147.Lloclists_table_base0:148	.long	.Ldebug_loc0-.Lloclists_table_base0149	.long	.Ldebug_loc1-.Lloclists_table_base0150	.long	.Ldebug_loc2-.Lloclists_table_base0151.Ldebug_loc0:152	.byte	3153	.byte	0154	.uleb128 .Ltmp0-.Lfunc_begin0155	.byte	1156	.byte	80157	.byte	0158.Ldebug_loc1:159	.byte	1160	.byte	0161	.byte	4162	.uleb128 .Ltmp0-.Lfunc_begin0163	.uleb128 .Ltmp1-.Lfunc_begin0164	.byte	1165	.byte	80166	.byte	0167.Ldebug_loc2:168	.byte	1169	.byte	0170	.byte	4171	.uleb128 .Ltmp1-.Lfunc_begin0172	.uleb128 .Lfunc_end0-.Lfunc_begin0173	.byte	1174	.byte	80175	.byte	0176.Ldebug_loclist_table_end0:177	.section	.debug_abbrev,"",%progbits178	.byte	1179	.byte	17180	.byte	1181	.byte	37182	.byte	37183	.byte	19184	.byte	5185	.byte	3186	.byte	37187	.byte	114188	.byte	23189	.byte	16190	.byte	23191	.byte	27192	.byte	37193	.byte	17194	.byte	1195	.byte	85196	.byte	35197	.byte	115198	.byte	23199	.byte	116200	.byte	23201	.ascii	"\214\001"202	.byte	23203	.byte	0204	.byte	0205	.byte	2206	.byte	46207	.byte	1208	.byte	17209	.byte	27210	.byte	18211	.byte	6212	.byte	64213	.byte	24214	.byte	122215	.byte	25216	.byte	3217	.byte	37218	.byte	58219	.byte	11220	.byte	59221	.byte	11222	.byte	39223	.byte	25224	.byte	73225	.byte	19226	.byte	63227	.byte	25228	.byte	0229	.byte	0230	.byte	3231	.byte	5232	.byte	0233	.byte	2234	.byte	34235	.byte	3236	.byte	37237	.byte	58238	.byte	11239	.byte	59240	.byte	11241	.byte	73242	.byte	19243	.byte	0244	.byte	0245	.byte	4246	.byte	5247	.byte	0248	.byte	2249	.byte	24250	.byte	3251	.byte	37252	.byte	58253	.byte	11254	.byte	59255	.byte	11256	.byte	73257	.byte	19258	.byte	0259	.byte	0260	.byte	5261	.byte	52262	.byte	0263	.byte	2264	.byte	34265	.byte	3266	.byte	37267	.byte	58268	.byte	11269	.byte	59270	.byte	11271	.byte	73272	.byte	19273	.byte	0274	.byte	0275	.byte	6276	.byte	36277	.byte	0278	.byte	3279	.byte	37280	.byte	62281	.byte	11282	.byte	11283	.byte	11284	.byte	0285	.byte	0286	.byte	0287	.section	.debug_info,"",%progbits288.Lcu_begin0:289	.long	.Ldebug_info_end0-.Ldebug_info_start0290.Ldebug_info_start0:291	.short	5292	.byte	1293	.byte	4294	.long	.debug_abbrev295	.byte	1296	.byte	0297	.short	12298	.byte	1299	.long	.Lstr_offsets_base0300	.long	.Lline_table_start0301	.byte	2302	.long	0303	.byte	0304	.long	.Laddr_table_base0305	.long	.Lrnglists_table_base0306	.long	.Lloclists_table_base0307	.byte	2308	.byte	0309	.long	.Lfunc_end0-.Lfunc_begin0310	.byte	1311	.byte	91312 313	.byte	3314	.byte	1315	.byte	1316 317	.long	132318 319	.byte	3320	.byte	0321	.byte	6322	.byte	1323	.byte	1324	.long	132325	.byte	4326	.byte	1327	.byte	81328	.byte	7329	.byte	1330	.byte	1331	.long	132332	.byte	4333	.byte	1334	.byte	82335	.byte	8336	.byte	1337	.byte	1338	.long	132339	.byte	5340	.byte	1341	.byte	9342	.byte	1343	.byte	2344	.long	132345	.byte	5346	.byte	2347	.byte	10348	.byte	1349	.byte	3350	.long	132351	.byte	0352	.byte	2353	.byte	1354	.long	.Lfunc_end1-.Lfunc_begin1355	.byte	1356	.byte	91357 358	.byte	5359	.byte	1360	.byte	7361 362	.long	132363 364	.byte	4365	.byte	1366	.byte	80367	.byte	6368	.byte	1369	.byte	7370	.long	132371	.byte	0372	.byte	6373	.byte	4374	.byte	5375	.byte	4376	.byte	0377.Ldebug_info_end0:378	.section	.debug_rnglists,"",%progbits379	.long	.Ldebug_rnglist_table_end0-.Ldebug_rnglist_table_start0380.Ldebug_rnglist_table_start0:381	.short	5382	.byte	4383	.byte	0384	.long	1385.Lrnglists_table_base0:386	.long	.Ldebug_ranges0-.Lrnglists_table_base0387.Ldebug_ranges0:388	.byte	3389	.byte	0390	.uleb128 .Lfunc_end0-.Lfunc_begin0391	.byte	3392	.byte	1393	.uleb128 .Lfunc_end1-.Lfunc_begin1394	.byte	0395.Ldebug_rnglist_table_end0:396	.section	.debug_addr,"",%progbits397	.long	.Ldebug_addr_end0-.Ldebug_addr_start0398.Ldebug_addr_start0:399	.short	5400	.byte	4401	.byte	0402.Laddr_table_base0:403	.long	.Lfunc_begin0404	.long	.Lfunc_begin1405.Ldebug_addr_end0:406	.ident	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"407	.section	".note.GNU-stack","",%progbits408	.addrsig409	.eabi_attribute	30, 1410	.section	.debug_line,"",%progbits411.Lline_table_start0:412