brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.9 KiB · 8a63a4e Raw
383 lines · plain
1## Check that the --debug-vars option works for simple register locations, when2## using DWARF5 debug info, with multiple functions in one section.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-3 -S -o -6 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: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: 0000000c <bar>:24# CHECK-NEXT:                                                                   ┠─ a = R025# CHECK-NEXT:        c:       add     r0, r0, #1                                ┃26# CHECK-NEXT:       10:       bx      lr                                        ┻27 28	.text29	.syntax unified30	.eabi_attribute	67, "2.09"31	.eabi_attribute	6, 1032	.eabi_attribute	7, 6533	.eabi_attribute	8, 134	.eabi_attribute	9, 235	.fpu	neon36	.eabi_attribute	34, 037	.eabi_attribute	17, 138	.eabi_attribute	20, 139	.eabi_attribute	21, 140	.eabi_attribute	23, 341	.eabi_attribute	24, 142	.eabi_attribute	25, 143	.eabi_attribute	38, 144	.eabi_attribute	18, 445	.eabi_attribute	26, 246	.eabi_attribute	14, 047	.file	"debug.c"48	.globl	foo49	.p2align	250	.type	foo,%function51	.code	3252foo:53.Lfunc_begin0:54	.file	0 "/work/scratch" "/work/llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c" md5 0x07374f01ab24ec7c07db73bc13bd778e55	.file	1 "/work" "llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c" md5 0x07374f01ab24ec7c07db73bc13bd778e56	.loc	1 1 057	.fnstart58	.cfi_sections .debug_frame59	.cfi_startproc60	.loc	1 2 13 prologue_end61	add	r0, r1, r062.Ltmp0:63	.loc	1 3 1364	add	r0, r0, r265.Ltmp1:66	.loc	1 4 367	bx	lr68.Ltmp2:69.Lfunc_end0:70	.size	foo, .Lfunc_end0-foo71	.cfi_endproc72	.cantunwind73	.fnend74 75	.globl	bar76	.p2align	277	.type	bar,%function78	.code	3279bar:80.Lfunc_begin1:81	.loc	1 7 082	.fnstart83	.cfi_startproc84	.loc	1 8 4 prologue_end85	add	r0, r0, #186.Ltmp3:87	.loc	1 9 388	bx	lr89.Ltmp4:90.Lfunc_end1:91	.size	bar, .Lfunc_end1-bar92	.cfi_endproc93	.cantunwind94	.fnend95 96	.section	.debug_str_offsets,"",%progbits97	.long	4898	.short	599	.short	0100.Lstr_offsets_base0:101	.section	.debug_str,"MS",%progbits,1102.Linfo_string0:103	.asciz	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"104.Linfo_string1:105	.asciz	"/work/llvm/src/llvm/test/tools/llvm-objdump/ARM/Inputs/debug.c"106.Linfo_string2:107	.asciz	"/work/scratch"108.Linfo_string3:109	.asciz	"foo"110.Linfo_string4:111	.asciz	"int"112.Linfo_string5:113	.asciz	"bar"114.Linfo_string6:115	.asciz	"a"116.Linfo_string7:117	.asciz	"b"118.Linfo_string8:119	.asciz	"c"120.Linfo_string9:121	.asciz	"x"122.Linfo_string10:123	.asciz	"y"124	.section	.debug_str_offsets,"",%progbits125	.long	.Linfo_string0126	.long	.Linfo_string1127	.long	.Linfo_string2128	.long	.Linfo_string3129	.long	.Linfo_string4130	.long	.Linfo_string5131	.long	.Linfo_string6132	.long	.Linfo_string7133	.long	.Linfo_string8134	.long	.Linfo_string9135	.long	.Linfo_string10136	.section	.debug_loclists,"",%progbits137	.long	.Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0138.Ldebug_loclist_table_start0:139	.short	5140	.byte	4141	.byte	0142	.long	3143.Lloclists_table_base0:144	.long	.Ldebug_loc0-.Lloclists_table_base0145	.long	.Ldebug_loc1-.Lloclists_table_base0146	.long	.Ldebug_loc2-.Lloclists_table_base0147.Ldebug_loc0:148	.byte	4149	.uleb128 .Lfunc_begin0-.Lfunc_begin0150	.uleb128 .Ltmp0-.Lfunc_begin0151	.byte	1152	.byte	80153	.byte	0154.Ldebug_loc1:155	.byte	4156	.uleb128 .Ltmp0-.Lfunc_begin0157	.uleb128 .Ltmp1-.Lfunc_begin0158	.byte	1159	.byte	80160	.byte	0161.Ldebug_loc2:162	.byte	4163	.uleb128 .Ltmp1-.Lfunc_begin0164	.uleb128 .Lfunc_end0-.Lfunc_begin0165	.byte	1166	.byte	80167	.byte	0168.Ldebug_loclist_table_end0:169	.section	.debug_abbrev,"",%progbits170	.byte	1171	.byte	17172	.byte	1173	.byte	37174	.byte	37175	.byte	19176	.byte	5177	.byte	3178	.byte	37179	.byte	114180	.byte	23181	.byte	16182	.byte	23183	.byte	27184	.byte	37185	.byte	17186	.byte	27187	.byte	18188	.byte	6189	.byte	115190	.byte	23191	.ascii	"\214\001"192	.byte	23193	.byte	0194	.byte	0195	.byte	2196	.byte	46197	.byte	1198	.byte	17199	.byte	27200	.byte	18201	.byte	6202	.byte	64203	.byte	24204	.byte	122205	.byte	25206	.byte	3207	.byte	37208	.byte	58209	.byte	11210	.byte	59211	.byte	11212	.byte	39213	.byte	25214	.byte	73215	.byte	19216	.byte	63217	.byte	25218	.byte	0219	.byte	0220	.byte	3221	.byte	5222	.byte	0223	.byte	2224	.byte	34225	.byte	3226	.byte	37227	.byte	58228	.byte	11229	.byte	59230	.byte	11231	.byte	73232	.byte	19233	.byte	0234	.byte	0235	.byte	4236	.byte	5237	.byte	0238	.byte	2239	.byte	24240	.byte	3241	.byte	37242	.byte	58243	.byte	11244	.byte	59245	.byte	11246	.byte	73247	.byte	19248	.byte	0249	.byte	0250	.byte	5251	.byte	52252	.byte	0253	.byte	2254	.byte	34255	.byte	3256	.byte	37257	.byte	58258	.byte	11259	.byte	59260	.byte	11261	.byte	73262	.byte	19263	.byte	0264	.byte	0265	.byte	6266	.byte	36267	.byte	0268	.byte	3269	.byte	37270	.byte	62271	.byte	11272	.byte	11273	.byte	11274	.byte	0275	.byte	0276	.byte	0277	.section	.debug_info,"",%progbits278.Lcu_begin0:279	.long	.Ldebug_info_end0-.Ldebug_info_start0280.Ldebug_info_start0:281	.short	5282	.byte	1283	.byte	4284	.long	.debug_abbrev285	.byte	1286	.byte	0287	.short	12288	.byte	1289	.long	.Lstr_offsets_base0290	.long	.Lline_table_start0291	.byte	2292	.byte	0293	.long	.Lfunc_end1-.Lfunc_begin0294	.long	.Laddr_table_base0295	.long	.Lloclists_table_base0296	.byte	2297	.byte	0298	.long	.Lfunc_end0-.Lfunc_begin0299	.byte	1300	.byte	91301 302	.byte	3303	.byte	1304	.byte	1305 306	.long	128307 308	.byte	3309	.byte	0310	.byte	6311	.byte	1312	.byte	1313	.long	128314	.byte	4315	.byte	1316	.byte	81317	.byte	7318	.byte	1319	.byte	1320	.long	128321	.byte	4322	.byte	1323	.byte	82324	.byte	8325	.byte	1326	.byte	1327	.long	128328	.byte	5329	.byte	1330	.byte	9331	.byte	1332	.byte	2333	.long	128334	.byte	5335	.byte	2336	.byte	10337	.byte	1338	.byte	3339	.long	128340	.byte	0341	.byte	2342	.byte	1343	.long	.Lfunc_end1-.Lfunc_begin1344	.byte	1345	.byte	91346 347	.byte	5348	.byte	1349	.byte	7350 351	.long	128352 353	.byte	4354	.byte	1355	.byte	80356	.byte	6357	.byte	1358	.byte	7359	.long	128360	.byte	0361	.byte	6362	.byte	4363	.byte	5364	.byte	4365	.byte	0366.Ldebug_info_end0:367	.section	.debug_addr,"",%progbits368	.long	.Ldebug_addr_end0-.Ldebug_addr_start0369.Ldebug_addr_start0:370	.short	5371	.byte	4372	.byte	0373.Laddr_table_base0:374	.long	.Lfunc_begin0375	.long	.Lfunc_begin1376.Ldebug_addr_end0:377	.ident	"clang version 10.0.0 (git@github.com:llvm/llvm-project.git e73f78acd34360f7450b81167d9dc858ccddc262)"378	.section	".note.GNU-stack","",%progbits379	.addrsig380	.eabi_attribute	30, 1381	.section	.debug_line,"",%progbits382.Lline_table_start0:383