1#!/usr/local/bin/bash
2# Copyright (C) 2013 Red Hat, Inc.
3# This file is part of elfutils.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# elfutils is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18. $srcdir/test-subr.sh
19
20# See the source files testfile_const_type.c testfile_implicit_value.c
21# testfile_entry_value.c testfile_parameter_ref.c testfile_implicit_pointer.c
22# how to regenerate the test files (needs GCC 4.8+).
23
24testfiles testfile_const_type testfile_implicit_value testfile_entry_value
25testfiles testfile_parameter_ref testfile_implicit_pointer
26
27testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_const_type <<\EOF
28module 'testfile_const_type'
29[b] CU 'const_type.c'@0
30  [33] function 'f1'@80483f0
31    frame_base: {call_frame_cfa {bregx(4,4)}}
32    [4b] parameter 'd'
33      [80483f0,804841b) {fbreg(0)}
34    [57] variable 'w'
35      [80483f0,804841b) {fbreg(0), GNU_deref_type(8){long long int,signed,64@[25]}, GNU_const_type{long long int,signed,64@[25]}(8)[0000806745230100], div, GNU_convert{long long unsigned int,unsigned,64@[2c]}, stack_value}
36  [7d] function 'main'@80482f0
37    frame_base: {call_frame_cfa {bregx(4,4)}}
38EOF
39
40testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_implicit_value <<\EOF
41module 'testfile_implicit_value'
42[b] CU 'implicit_value.c'@0
43  [25] function 'foo'@80483f0
44    frame_base: {call_frame_cfa {bregx(4,4)}}
45    [3e] variable 'a'
46      [80483f0,80483f6) {implicit_value(8){0200000000000000}, piece(8), implicit_value(8){1500000000000000}, piece(8)}
47  [86] function 'main'@80482f0
48    frame_base: {call_frame_cfa {bregx(4,4)}}
49EOF
50
51testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_entry_value <<\EOF
52module 'testfile_entry_value'
53[b] CU 'entry_value.c'@0
54  [29] function 'foo'@400500
55    frame_base: {call_frame_cfa {bregx(7,8)}}
56    [4a] parameter 'x'
57      [400500,400504) {reg5}
58    [55] parameter 'y'
59      [400500,400504) {reg4}
60  [68] function 'bar'@400510
61    frame_base: {call_frame_cfa {bregx(7,8)}}
62    [89] parameter 'x'
63      [400510,40051c) {reg5}
64      [40051c,40052b) {reg6}
65      [40052b,400531) {GNU_entry_value(1) {reg5}, stack_value}
66    [96] parameter 'y'
67      [400510,40051c) {reg4}
68      [40051c,40052a) {reg3}
69      [40052a,400531) {GNU_entry_value(1) {reg4}, stack_value}
70    [a3] variable 'z'
71      [400524,400528) {reg0}
72      [400528,400529) {reg12}
73      [400529,40052e) {breg0(0), breg12(0), plus, stack_value}
74      [40052e,400531) {reg0}
75  [e9] function 'main'@400400
76    frame_base: {call_frame_cfa {bregx(7,8)}}
77    [10a] parameter 'argc'
78      [400400,400406) {reg5}
79      [400406,40040a) {breg5(-1), stack_value}
80      [40040a,40040b) {GNU_entry_value(1) {reg5}, stack_value}
81    [119] parameter 'argv'
82      [400400,400403) {reg4}
83      [400403,40040b) {GNU_entry_value(1) {reg4}, stack_value}
84EOF
85
86testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_parameter_ref <<\EOF
87module 'testfile_parameter_ref'
88[b] CU 'parameter_ref.c'@0
89  [77] function 'foo'@400510
90    frame_base: {call_frame_cfa {bregx(7,8)}}
91    [92] parameter 'x'
92      [400510,400523) {reg5}
93    [99] parameter 'y'
94      [400510,400523) {GNU_parameter_ref[42], stack_value}
95    [a5] variable 'a'
96      [400510,400523) {breg5(0), lit1, shl, stack_value}
97    [b0] variable 'b'
98      [400510,400523) {GNU_parameter_ref[42], lit1, shl, stack_value}
99    [be] variable 'c'
100      <constant value>
101    [c4] parameter 'z'
102      <constant value>
103  [cb] function 'main'@400400
104    frame_base: {call_frame_cfa {bregx(7,8)}}
105    [ec] parameter 'x'
106      [400400,400408) {reg5}
107      [400408,400421) {reg3}
108      [400421,400423) {GNU_entry_value(1) {reg5}, stack_value}
109    [f9] parameter 'argv'
110      [400400,400408) {reg4}
111      [400408,400423) {GNU_entry_value(1) {reg4}, stack_value}
112EOF
113
114testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_implicit_pointer <<\EOF
115module 'testfile_implicit_pointer'
116[b] CU 'implicit_pointer.c'@0
117  [29] function 'foo'@400500
118    frame_base: {call_frame_cfa {bregx(7,8)}}
119    [4a] parameter 'i'
120      [400500,400503) {reg5}
121    [55] variable 'p'
122      [400500,400503) {GNU_implicit_pointer([4a],0) {reg5}}
123  [73] function 'main'@400400
124    frame_base: {call_frame_cfa {bregx(7,8)}}
125EOF
126
127# Multi CU DWARF5. See run-dwarf-ranges.sh.
128testfiles testfileranges5.debug
129testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfileranges5.debug <<\EOF
130module 'testfileranges5.debug'
131[c] CU 'hello.c'@0
132  [2a] function 'no_say'@401160
133    frame_base: {call_frame_cfa {...}}
134    [4a] parameter 'prefix'
135      [401160,401169) {reg5}
136      [401169,40116a) {entry_value(1) {reg5}, stack_value}
137      [40116a,401175) {reg5}
138      [401175,40117a) {entry_value(1) {reg5}, stack_value}
139    [59] variable 'world'
140      [401160,40117a) {addr(0x402004), stack_value}
141  [bd] function 'main'@401050
142    frame_base: {call_frame_cfa {...}}
143    [dd] parameter 'argc'
144      [401050,401062) {reg5}
145      [401062,401067) {entry_value(1) {reg5}, stack_value}
146    [ec] parameter 'argv'
147      [401050,401066) {reg4}
148      [401066,401067) {entry_value(1) {reg4}, stack_value}
149  [fb] inlined function 'subject'@401053
150    [117] parameter 'count'
151      [401053,40105f) {reg5}
152    [120] parameter 'word'
153      [401053,40105f) {reg0}
154  [168] function 'subject'@401150
155    frame_base: {call_frame_cfa {...}}
156    [183] parameter 'word'
157      [401150,401160) {reg5}
158    [18a] parameter 'count'
159      [401150,401160) {reg4}
160module 'testfileranges5.debug'
161[1ab] CU 'world.c'@401180
162  [1cd] function 'no_main'@4011d0
163    frame_base: {call_frame_cfa {...}}
164    [1ef] parameter 'argc'
165      [4011d0,4011e2) {reg5}
166      [4011e2,4011e7) {entry_value(1) {reg5}, stack_value}
167    [1fe] parameter 'argv'
168      [4011d0,4011e6) {reg4}
169      [4011e6,4011e7) {entry_value(1) {reg4}, stack_value}
170  [20d] inlined function 'no_subject'@4011d3
171    [229] parameter 'count'
172      [4011d3,4011df) {reg5}
173    [232] parameter 'word'
174      [4011d3,4011df) {reg0}
175  [28d] function 'say'@401180
176    frame_base: {call_frame_cfa {...}}
177    [2af] parameter 'prefix'
178      [401180,40118e) {reg5}
179      [40118e,40119c) {reg3}
180      [40119c,4011a7) {entry_value(1) {reg5}, stack_value}
181      [4011a7,4011b5) {reg3}
182      [4011b5,4011c0) {entry_value(1) {reg5}, stack_value}
183    [2be] variable 'world'
184      [401193,40119b) {reg0}
185      [4011a7,4011b4) {reg0}
186  [2ce] inlined function 'happy'@40119b
187    [2e6] parameter 'w'
188      [4011a7,4011b4) {reg0}
189  [2ef] inlined function 'sad'@40119b
190    [303] parameter 'c'
191      [40119b,4011a6) {reg0}
192      [4011a6,4011a7) {entry_value(1) {reg5}}
193      [4011b4,4011bf) {reg0}
194  [36b] function 'no_subject'@4011c0
195    frame_base: {call_frame_cfa {...}}
196    [386] parameter 'word'
197      [4011c0,4011d0) {reg5}
198    [38d] parameter 'count'
199      [4011c0,4011d0) {reg4}
200EOF
201
202# Multi CU Split DWARF5. See run-dwarf-ranges.sh.
203# Note that the DIE numbers change, but the actual location addresses are
204# the same as above, even though the representation is totally different.
205testfiles testfilesplitranges5.debug
206testfiles testfile-ranges-hello5.dwo testfile-ranges-world5.dwo
207testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfilesplitranges5.debug <<\EOF
208module 'testfilesplitranges5.debug'
209[14] CU 'hello.c'
210  [1d] function 'no_say'@401160
211    frame_base: {call_frame_cfa {...}}
212    [33] parameter 'prefix'
213      [401160,401169) {reg5}
214      [401169,40116a) {entry_value(1) {reg5}, stack_value}
215      [40116a,401175) {reg5}
216      [401175,40117a) {entry_value(1) {reg5}, stack_value}
217    [3c] variable 'world'
218      [401160,40117a) {addr: 0x402004, stack_value}
219  [7e] function 'main'@401050
220    frame_base: {call_frame_cfa {...}}
221    [94] parameter 'argc'
222      [401050,401062) {reg5}
223      [401062,401067) {entry_value(1) {reg5}, stack_value}
224    [9d] parameter 'argv'
225      [401050,401066) {reg4}
226      [401066,401067) {entry_value(1) {reg4}, stack_value}
227  [a6] inlined function 'subject'@401053
228    [bb] parameter 'count'
229      [401053,40105f) {reg5}
230    [c1] parameter 'word'
231      [401053,40105f) {reg0}
232  [f6] function 'subject'@401150
233    frame_base: {call_frame_cfa {...}}
234    [10a] parameter 'word'
235      [401150,401160) {reg5}
236    [111] parameter 'count'
237      [401150,401160) {reg4}
238module 'testfilesplitranges5.debug'
239[14] CU 'world.c'
240  [1d] function 'no_main'@4011d0
241    frame_base: {call_frame_cfa {...}}
242    [35] parameter 'argc'
243      [4011d0,4011e2) {reg5}
244      [4011e2,4011e7) {entry_value(1) {reg5}, stack_value}
245    [3e] parameter 'argv'
246      [4011d0,4011e6) {reg4}
247      [4011e6,4011e7) {entry_value(1) {reg4}, stack_value}
248  [47] inlined function 'no_subject'@4011d3
249    [5c] parameter 'count'
250      [4011d3,4011df) {reg5}
251    [62] parameter 'word'
252      [4011d3,4011df) {reg0}
253  [a7] function 'say'@401180
254    frame_base: {call_frame_cfa {...}}
255    [c2] parameter 'prefix'
256      [401180,40118e) {reg5}
257      [40118e,40119c) {reg3}
258      [40119c,4011a7) {entry_value(1) {reg5}, stack_value}
259      [4011a7,4011b5) {reg3}
260      [4011b5,4011c0) {entry_value(1) {reg5}, stack_value}
261    [cb] variable 'world'
262      [401193,40119b) {reg0}
263      [4011a7,4011b4) {reg0}
264  [d5] inlined function 'happy'@40119b
265    [e3] parameter 'w'
266      [4011a7,4011b4) {reg0}
267  [e9] inlined function 'sad'@40119b
268    [f3] parameter 'c'
269      [40119b,4011a6) {reg0}
270      [4011a6,4011a7) {entry_value(1) {reg5}}
271      [4011b4,4011bf) {reg0}
272  [147] function 'no_subject'@4011c0
273    frame_base: {call_frame_cfa {...}}
274    [15b] parameter 'word'
275      [4011c0,4011d0) {reg5}
276    [162] parameter 'count'
277      [4011c0,4011d0) {reg4}
278EOF
279
280# GNU DebugFissuon Multi CU Split DWARF. See run-dwarf-ranges.sh.
281testfiles testfilesplitranges4.debug
282testfiles testfile-ranges-hello.dwo testfile-ranges-world.dwo
283testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfilesplitranges4.debug <<\EOF
284module 'testfilesplitranges4.debug'
285[b] CU 'hello.c'
286  [18] function 'no_say'@4004f0
287    frame_base: {call_frame_cfa {...}}
288    [2f] parameter 'prefix'
289      [4004f0,4004fa) {reg5}
290      [4004fa,4004ff) {GNU_entry_value(1) {reg5}, stack_value}
291    [3b] variable 'world'
292      <no value>
293  [60] function 'main'@4003e0
294    frame_base: {call_frame_cfa {...}}
295    [77] parameter 'argc'
296      [4003e0,4003f2) {reg5}
297      [4003f2,4003f7) {GNU_entry_value(1) {reg5}, stack_value}
298    [83] parameter 'argv'
299      [4003e0,4003f6) {reg4}
300      [4003f6,1004003f5) {GNU_entry_value(1) {reg4}, stack_value}
301  [8f] inlined function 'subject'@4003e3
302    [a3] parameter 'count'
303      [4003e3,4003ef) {reg5}
304    [ac] parameter 'word'
305      [4003e3,4003ef) {reg0}
306  [e7] function 'subject'@4004e0
307    frame_base: {call_frame_cfa {...}}
308    [fb] parameter 'word'
309      [4004e0,4004f0) {reg5}
310    [102] parameter 'count'
311      [4004e0,4004f0) {reg4}
312module 'testfilesplitranges4.debug'
313[b] CU 'world.c'
314  [18] function 'no_main'@400550
315    frame_base: {call_frame_cfa {...}}
316    [2f] parameter 'argc'
317      [400550,400562) {reg5}
318      [400562,400567) {GNU_entry_value(1) {reg5}, stack_value}
319    [3b] parameter 'argv'
320      [400550,400566) {reg4}
321      [400566,100400565) {GNU_entry_value(1) {reg4}, stack_value}
322  [47] inlined function 'no_subject'@400553
323    [5b] parameter 'count'
324      [400553,40055f) {reg5}
325    [64] parameter 'word'
326      [400553,40055f) {reg0}
327  [af] function 'say'@400500
328    frame_base: {call_frame_cfa {...}}
329    [c9] parameter 'prefix'
330      [400500,40050e) {reg5}
331      [40050e,40051c) {reg3}
332      [40051c,400527) {GNU_entry_value(1) {reg5}, stack_value}
333      [400527,400535) {reg3}
334      [400535,400540) {GNU_entry_value(1) {reg5}, stack_value}
335    [d5] variable 'world'
336      [400513,40051b) {reg0}
337      [400527,400534) {reg0}
338  [e1] inlined function 'happy'@40051c
339    [f1] parameter 'w'
340      [400527,400534) {reg0}
341  [fa] inlined function 'sad'@40051c
342    [106] parameter 'c'
343      [40051b,400526) {reg0}
344      [400526,400527) {GNU_entry_value(1) {reg5}}
345      [400534,40053f) {reg0}
346  [15c] function 'no_subject'@400540
347    frame_base: {call_frame_cfa {...}}
348    [170] parameter 'word'
349      [400540,400550) {reg5}
350    [177] parameter 'count'
351      [400540,400550) {reg4}
352EOF
353
354# DW_OP_addrx and DW_OP_constx testcases.
355#
356# int i, j, k;
357# __thread int l, m, n;
358#
359# int main ()
360# {
361#   int r1 = i + j + k;
362#   int r2 = l + m + n;
363#   int res = r1 + r2;
364#
365#   return res;
366# }
367#
368# gcc -O2 -gdwarf-5 -gsplit-dwarf -o addrx_constx-5.o -c addrx_constx.c
369# gcc -O2 -gdwarf-5 -gsplit-dwarf -o testfile-addrx_constx-5 addrx_constx-5.o
370# gcc -O2 -gdwarf-4 -gsplit-dwarf -o addrx_constx-4.o -c addrx_constx.c
371# gcc -O2 -gdwarf-4 -gsplit-dwarf -o testfile-addrx_constx-4 addrx_constx-4.o
372
373testfiles testfile-addrx_constx-5 addrx_constx-5.dwo
374testrun_compare ${abs_top_builddir}/tests/varlocs --exprlocs -e testfile-addrx_constx-5 <<\EOF
375module 'testfile-addrx_constx-5'
376[14] CU 'addrx_constx.c'
377  producer (strx)
378  language (data1)
379  name (strx)
380  comp_dir (strx)
381  [19] variable "i"
382    name (string)
383    decl_file (implicit_const)
384    decl_line (data1)
385    decl_column (data1)
386    type (ref4)
387    external (flag_present)
388    location (exprloc) {addr: 0x404038}
389  [25] base_type "int"
390    byte_size (data1)
391    encoding (data1)
392    name (string)
393  [2c] variable "j"
394    name (string)
395    decl_file (implicit_const)
396    decl_line (data1)
397    decl_column (data1)
398    type (ref4)
399    external (flag_present)
400    location (exprloc) {addr: 0x404034}
401  [38] variable "k"
402    name (string)
403    decl_file (implicit_const)
404    decl_line (data1)
405    decl_column (data1)
406    type (ref4)
407    external (flag_present)
408    location (exprloc) {addr: 0x40403c}
409  [44] variable "l"
410    name (string)
411    decl_file (implicit_const)
412    decl_line (data1)
413    decl_column (data1)
414    type (ref4)
415    external (flag_present)
416    location (exprloc) {const: 0x403e10, form_tls_address}
417  [51] variable "m"
418    name (string)
419    decl_file (implicit_const)
420    decl_line (data1)
421    decl_column (data1)
422    type (ref4)
423    external (flag_present)
424    location (exprloc) {const: 0x403e0c, form_tls_address}
425  [5e] variable "n"
426    name (string)
427    decl_file (implicit_const)
428    decl_line (data1)
429    decl_column (data1)
430    type (ref4)
431    external (flag_present)
432    location (exprloc) {const: 0x403e08, form_tls_address}
433  [6b] subprogram "main"
434    external (flag_present)
435    name (strx)
436    decl_file (data1)
437    decl_line (data1)
438    decl_column (data1)
439    type (ref4)
440    low_pc (addrx)
441    high_pc (data8)
442    frame_base (exprloc) {call_frame_cfa {bregx(7,8)}}
443    call_all_calls (flag_present)
444    [7f] variable "r1"
445      name (string)
446      decl_file (implicit_const)
447      decl_line (data1)
448      decl_column (implicit_const)
449      type (ref4)
450      location (exprloc) {addr: 0x404038, deref_size(4), addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value}
451    [98] variable "r2"
452      name (string)
453      decl_file (implicit_const)
454      decl_line (data1)
455      decl_column (implicit_const)
456      type (ref4)
457      location (exprloc) {form_tls_address, const: 0x403e10, deref_size(4), form_tls_address, const: 0x403e0c, deref_size(4), plus, form_tls_address, const: 0x403e08, deref_size(4), plus, stack_value}
458    [b4] variable "res"
459      name (string)
460      decl_file (implicit_const)
461      decl_line (data1)
462      decl_column (implicit_const)
463      type (ref4)
464      location (exprloc) {addr: 0x404038, deref_size(4), form_tls_address, const: 0x403e08, deref_size(4), plus, form_tls_address, const: 0x403e0c, deref_size(4), plus, form_tls_address, const: 0x403e10, deref_size(4), plus, addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value}
465EOF
466
467testfiles testfile-addrx_constx-4 addrx_constx-4.dwo
468testrun_compare ${abs_top_builddir}/tests/varlocs --exprlocs -e testfile-addrx_constx-4 <<\EOF
469module 'testfile-addrx_constx-4'
470[b] CU 'addrx_constx.c'
471  producer (GNU_str_index)
472  language (data1)
473  name (GNU_str_index)
474  comp_dir (GNU_str_index)
475  GNU_dwo_id (data8)
476  [18] variable "i"
477    name (string)
478    decl_file (data1)
479    decl_line (data1)
480    decl_column (data1)
481    type (ref4)
482    external (flag_present)
483    location (exprloc) {addr: 0x404038}
484  [25] base_type "int"
485    byte_size (data1)
486    encoding (data1)
487    name (string)
488  [2c] variable "j"
489    name (string)
490    decl_file (data1)
491    decl_line (data1)
492    decl_column (data1)
493    type (ref4)
494    external (flag_present)
495    location (exprloc) {addr: 0x404034}
496  [39] variable "k"
497    name (string)
498    decl_file (data1)
499    decl_line (data1)
500    decl_column (data1)
501    type (ref4)
502    external (flag_present)
503    location (exprloc) {addr: 0x40403c}
504  [46] variable "l"
505    name (string)
506    decl_file (data1)
507    decl_line (data1)
508    decl_column (data1)
509    type (ref4)
510    external (flag_present)
511    location (exprloc) {const: 0x403e10, GNU_push_tls_address}
512  [54] variable "m"
513    name (string)
514    decl_file (data1)
515    decl_line (data1)
516    decl_column (data1)
517    type (ref4)
518    external (flag_present)
519    location (exprloc) {const: 0x403e0c, GNU_push_tls_address}
520  [62] variable "n"
521    name (string)
522    decl_file (data1)
523    decl_line (data1)
524    decl_column (data1)
525    type (ref4)
526    external (flag_present)
527    location (exprloc) {const: 0x403e08, GNU_push_tls_address}
528  [70] subprogram "main"
529    external (flag_present)
530    name (GNU_str_index)
531    decl_file (data1)
532    decl_line (data1)
533    decl_column (data1)
534    type (ref4)
535    low_pc (GNU_addr_index)
536    high_pc (data8)
537    frame_base (exprloc) {call_frame_cfa {bregx(7,8)}}
538    GNU_all_call_sites (flag_present)
539    [84] variable "r1"
540      name (string)
541      decl_file (data1)
542      decl_line (data1)
543      decl_column (data1)
544      type (ref4)
545      location (exprloc) {addr: 0x404038, deref_size(4), addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value}
546    [9f] variable "r2"
547      name (string)
548      decl_file (data1)
549      decl_line (data1)
550      decl_column (data1)
551      type (ref4)
552      location (exprloc) {GNU_push_tls_address, const: 0x403e10, deref_size(4), GNU_push_tls_address, const: 0x403e0c, deref_size(4), plus, GNU_push_tls_address, const: 0x403e08, deref_size(4), plus, stack_value}
553    [bd] variable "res"
554      name (string)
555      decl_file (data1)
556      decl_line (data1)
557      decl_column (data1)
558      type (ref4)
559      location (exprloc) {addr: 0x404038, deref_size(4), GNU_push_tls_address, const: 0x403e08, deref_size(4), plus, GNU_push_tls_address, const: 0x403e0c, deref_size(4), plus, GNU_push_tls_address, const: 0x403e10, deref_size(4), plus, addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value}
560EOF
561
562# See run-readelf-loc.sh
563testfiles testfile-splitdwarf4-not-split4.debug
564testfiles splitdwarf4-not-split4.dwo
565
566testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfile-splitdwarf4-not-split4.debug <<\EOF
567module 'testfile-splitdwarf4-not-split4.debug'
568[b] CU 'splitdwarf4-not-split4.c'
569  [18] function 'main'@401050
570    frame_base: {call_frame_cfa {...}}
571    [30] parameter 'argc'
572      [401050,40106e) {reg5}
573      [40106e,401086) {reg12}
574      [401086,401095) {GNU_entry_value(1) {reg5}, stack_value}
575      [401095,40109c) {reg5}
576    [3d] parameter 'argv'
577      [401050,40106e) {reg4}
578      [40106e,401095) {GNU_entry_value(1) {reg4}, stack_value}
579      [401095,40109c) {reg4}
580    [4a] variable 'i'
581      [401050,40106e) {lit0, stack_value}
582      [401086,40108e) {breg12(0), breg6(0), plus, stack_value}
583      [40108e,401095) {reg0}
584      [401095,40109c) {lit0, stack_value}
585    [58] variable 'p'
586      [401050,40106e) {reg5}
587      [40106e,401090) {reg6}
588      [401095,40109c) {reg5}
589module 'testfile-splitdwarf4-not-split4.debug'
590[3f] CU 'popcount.c'@401180
591  [61] function 'popcount'@401180
592    frame_base: {call_frame_cfa {...}}
593    [83] parameter 'u'
594      [401180,401189) {reg5}
595      [401189,40119b) {reg1}
596      [40119b,40119d) {breg1(0), lit1, shr, stack_value}
597      [40119d,4011a1) {reg1}
598    [91] variable 'c'
599      [401180,401189) {lit0, stack_value}
600      [401189,4011a0) {reg0}
601      [4011a0,4011a1) {lit0, stack_value}
602EOF
603
604exit 0
605