• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2# Copyright (C) 2021 Facebook
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# // Program processed by https://github.com/facebookincubator/BOLT.
21# // gcc -g -O2 -fno-reorder-blocks-and-partition -Wl,--emit-relocs primes.c -o primes
22# // perf record -e cycles:u -j any,u -o perf.data -- ./primes 1000 > /dev/null
23# // perf2bolt -p perf.data -o perf.fdata ./primes
24# // llvm-bolt primes -o primes.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort -split-functions=2 -split-all-cold -split-eh -dyno-stats -update-debug-sections
25#
26# #include <inttypes.h>
27# #include <stdbool.h>
28# #include <stdio.h>
29# #include <stdlib.h>
30#
31# bool
32# is_prime (uint32_t n)
33# {
34#   if (n < 2)
35#     return false;
36#   if (n == 2)
37#     return true;
38#   if (n % 2 == 0)
39#     return false;
40#   for (uint32_t i = 3; i <= n / 2; i++)
41#     {
42#       if (n % i == 0)
43# 	return false;
44#     }
45#   return true;
46# }
47#
48# int
49# main (int argc, char *argv[])
50# {
51#   if (argc != 2)
52#     return EXIT_FAILURE;
53#   int n = atoi (argv[1]);
54#   for (uint32_t i = 2; n > 0; i++)
55#     {
56#       if (is_prime (i))
57# 	{
58# 	  printf ("%" PRIu32 "\n", i);
59# 	  n--;
60# 	}
61#     }
62#   return EXIT_SUCCESS;
63# }
64testfiles testfile-dw-form-indirect
65
66testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-dw-form-indirect << EOF
67
68DWARF section [33] '.debug_info' at offset 0x801db0:
69 [Offset]
70 Compilation unit at offset 0:
71 Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
72 [     b]  compile_unit         abbrev: 1
73           producer             (strp) "GNU C17 8.4.1 20200928 (Red Hat 8.4.1-1) -mtune=generic -march=x86-64 -g -O2 -fno-reorder-blocks-and-partition"
74           language             (data1) C99 (12)
75           name                 (strp) "primes.c"
76           comp_dir             (strp) "/home/osandov/bolt"
77           ranges               (sec_offset) range list [    10]
78           low_pc               (addr) 000000000000000000
79           stmt_list            (sec_offset) 0
80 [    29]    base_type            abbrev: 2
81             byte_size            (data1) 1
82             encoding             (data1) unsigned_char (8)
83             name                 (strp) "unsigned char"
84 [    30]    base_type            abbrev: 2
85             byte_size            (data1) 2
86             encoding             (data1) unsigned (7)
87             name                 (strp) "short unsigned int"
88 [    37]    base_type            abbrev: 2
89             byte_size            (data1) 4
90             encoding             (data1) unsigned (7)
91             name                 (strp) "unsigned int"
92 [    3e]    base_type            abbrev: 2
93             byte_size            (data1) 8
94             encoding             (data1) unsigned (7)
95             name                 (strp) "long unsigned int"
96 [    45]    base_type            abbrev: 2
97             byte_size            (data1) 1
98             encoding             (data1) signed_char (6)
99             name                 (strp) "signed char"
100 [    4c]    base_type            abbrev: 2
101             byte_size            (data1) 2
102             encoding             (data1) signed (5)
103             name                 (strp) "short int"
104 [    53]    base_type            abbrev: 3
105             byte_size            (data1) 4
106             encoding             (data1) signed (5)
107             name                 (string) "int"
108 [    5a]    typedef              abbrev: 4
109             name                 (strp) "__uint32_t"
110             decl_file            (data1) types.h (3)
111             decl_line            (data1) 41
112             decl_column          (data1) 22
113             type                 (ref4) [    37]
114 [    66]    base_type            abbrev: 2
115             byte_size            (data1) 8
116             encoding             (data1) signed (5)
117             name                 (strp) "long int"
118 [    6d]    typedef              abbrev: 4
119             name                 (strp) "__off_t"
120             decl_file            (data1) types.h (3)
121             decl_line            (data1) 150
122             decl_column          (data1) 25
123             type                 (ref4) [    66]
124 [    79]    typedef              abbrev: 4
125             name                 (strp) "__off64_t"
126             decl_file            (data1) types.h (3)
127             decl_line            (data1) 151
128             decl_column          (data1) 27
129             type                 (ref4) [    66]
130 [    85]    pointer_type         abbrev: 5
131             byte_size            (data1) 8
132 [    87]    pointer_type         abbrev: 6
133             byte_size            (data1) 8
134             type                 (ref4) [    8d]
135 [    8d]    base_type            abbrev: 2
136             byte_size            (data1) 1
137             encoding             (data1) signed_char (6)
138             name                 (strp) "char"
139 [    94]    const_type           abbrev: 7
140             type                 (ref4) [    8d]
141 [    99]    typedef              abbrev: 4
142             name                 (strp) "uint32_t"
143             decl_file            (data1) stdint-uintn.h (4)
144             decl_line            (data1) 26
145             decl_column          (data1) 20
146             type                 (ref4) [    5a]
147 [    a5]    typedef              abbrev: 4
148             name                 (strp) "size_t"
149             decl_file            (data1) stddef.h (5)
150             decl_line            (data1) 216
151             decl_column          (data1) 23
152             type                 (ref4) [    3e]
153 [    b1]    structure_type       abbrev: 8
154             name                 (strp) "_IO_FILE"
155             byte_size            (data1) 216
156             decl_file            (data1) struct_FILE.h (6)
157             decl_line            (data1) 49
158             decl_column          (data1) 8
159             sibling              (ref4) [   238]
160 [    be]      member               abbrev: 9
161               name                 (strp) "_flags"
162               decl_file            (data1) struct_FILE.h (6)
163               decl_line            (data1) 51
164               decl_column          (data1) 7
165               type                 (ref4) [    53]
166               data_member_location (data1) 0
167 [    cb]      member               abbrev: 9
168               name                 (strp) "_IO_read_ptr"
169               decl_file            (data1) struct_FILE.h (6)
170               decl_line            (data1) 54
171               decl_column          (data1) 9
172               type                 (ref4) [    87]
173               data_member_location (data1) 8
174 [    d8]      member               abbrev: 9
175               name                 (strp) "_IO_read_end"
176               decl_file            (data1) struct_FILE.h (6)
177               decl_line            (data1) 55
178               decl_column          (data1) 9
179               type                 (ref4) [    87]
180               data_member_location (data1) 16
181 [    e5]      member               abbrev: 9
182               name                 (strp) "_IO_read_base"
183               decl_file            (data1) struct_FILE.h (6)
184               decl_line            (data1) 56
185               decl_column          (data1) 9
186               type                 (ref4) [    87]
187               data_member_location (data1) 24
188 [    f2]      member               abbrev: 9
189               name                 (strp) "_IO_write_base"
190               decl_file            (data1) struct_FILE.h (6)
191               decl_line            (data1) 57
192               decl_column          (data1) 9
193               type                 (ref4) [    87]
194               data_member_location (data1) 32
195 [    ff]      member               abbrev: 9
196               name                 (strp) "_IO_write_ptr"
197               decl_file            (data1) struct_FILE.h (6)
198               decl_line            (data1) 58
199               decl_column          (data1) 9
200               type                 (ref4) [    87]
201               data_member_location (data1) 40
202 [   10c]      member               abbrev: 9
203               name                 (strp) "_IO_write_end"
204               decl_file            (data1) struct_FILE.h (6)
205               decl_line            (data1) 59
206               decl_column          (data1) 9
207               type                 (ref4) [    87]
208               data_member_location (data1) 48
209 [   119]      member               abbrev: 9
210               name                 (strp) "_IO_buf_base"
211               decl_file            (data1) struct_FILE.h (6)
212               decl_line            (data1) 60
213               decl_column          (data1) 9
214               type                 (ref4) [    87]
215               data_member_location (data1) 56
216 [   126]      member               abbrev: 9
217               name                 (strp) "_IO_buf_end"
218               decl_file            (data1) struct_FILE.h (6)
219               decl_line            (data1) 61
220               decl_column          (data1) 9
221               type                 (ref4) [    87]
222               data_member_location (data1) 64
223 [   133]      member               abbrev: 9
224               name                 (strp) "_IO_save_base"
225               decl_file            (data1) struct_FILE.h (6)
226               decl_line            (data1) 64
227               decl_column          (data1) 9
228               type                 (ref4) [    87]
229               data_member_location (data1) 72
230 [   140]      member               abbrev: 9
231               name                 (strp) "_IO_backup_base"
232               decl_file            (data1) struct_FILE.h (6)
233               decl_line            (data1) 65
234               decl_column          (data1) 9
235               type                 (ref4) [    87]
236               data_member_location (data1) 80
237 [   14d]      member               abbrev: 9
238               name                 (strp) "_IO_save_end"
239               decl_file            (data1) struct_FILE.h (6)
240               decl_line            (data1) 66
241               decl_column          (data1) 9
242               type                 (ref4) [    87]
243               data_member_location (data1) 88
244 [   15a]      member               abbrev: 9
245               name                 (strp) "_markers"
246               decl_file            (data1) struct_FILE.h (6)
247               decl_line            (data1) 68
248               decl_column          (data1) 22
249               type                 (ref4) [   251]
250               data_member_location (data1) 96
251 [   167]      member               abbrev: 9
252               name                 (strp) "_chain"
253               decl_file            (data1) struct_FILE.h (6)
254               decl_line            (data1) 70
255               decl_column          (data1) 20
256               type                 (ref4) [   257]
257               data_member_location (data1) 104
258 [   174]      member               abbrev: 9
259               name                 (strp) "_fileno"
260               decl_file            (data1) struct_FILE.h (6)
261               decl_line            (data1) 72
262               decl_column          (data1) 7
263               type                 (ref4) [    53]
264               data_member_location (data1) 112
265 [   181]      member               abbrev: 9
266               name                 (strp) "_flags2"
267               decl_file            (data1) struct_FILE.h (6)
268               decl_line            (data1) 73
269               decl_column          (data1) 7
270               type                 (ref4) [    53]
271               data_member_location (data1) 116
272 [   18e]      member               abbrev: 9
273               name                 (strp) "_old_offset"
274               decl_file            (data1) struct_FILE.h (6)
275               decl_line            (data1) 74
276               decl_column          (data1) 11
277               type                 (ref4) [    6d]
278               data_member_location (data1) 120
279 [   19b]      member               abbrev: 9
280               name                 (strp) "_cur_column"
281               decl_file            (data1) struct_FILE.h (6)
282               decl_line            (data1) 77
283               decl_column          (data1) 18
284               type                 (ref4) [    30]
285               data_member_location (data1) 128
286 [   1a8]      member               abbrev: 9
287               name                 (strp) "_vtable_offset"
288               decl_file            (data1) struct_FILE.h (6)
289               decl_line            (data1) 78
290               decl_column          (data1) 15
291               type                 (ref4) [    45]
292               data_member_location (data1) 130
293 [   1b5]      member               abbrev: 9
294               name                 (strp) "_shortbuf"
295               decl_file            (data1) struct_FILE.h (6)
296               decl_line            (data1) 79
297               decl_column          (data1) 8
298               type                 (ref4) [   25d]
299               data_member_location (data1) 131
300 [   1c2]      member               abbrev: 9
301               name                 (strp) "_lock"
302               decl_file            (data1) struct_FILE.h (6)
303               decl_line            (data1) 81
304               decl_column          (data1) 15
305               type                 (ref4) [   26d]
306               data_member_location (data1) 136
307 [   1cf]      member               abbrev: 9
308               name                 (strp) "_offset"
309               decl_file            (data1) struct_FILE.h (6)
310               decl_line            (data1) 89
311               decl_column          (data1) 13
312               type                 (ref4) [    79]
313               data_member_location (data1) 144
314 [   1dc]      member               abbrev: 9
315               name                 (strp) "_codecvt"
316               decl_file            (data1) struct_FILE.h (6)
317               decl_line            (data1) 91
318               decl_column          (data1) 23
319               type                 (ref4) [   278]
320               data_member_location (data1) 152
321 [   1e9]      member               abbrev: 9
322               name                 (strp) "_wide_data"
323               decl_file            (data1) struct_FILE.h (6)
324               decl_line            (data1) 92
325               decl_column          (data1) 25
326               type                 (ref4) [   283]
327               data_member_location (data1) 160
328 [   1f6]      member               abbrev: 9
329               name                 (strp) "_freeres_list"
330               decl_file            (data1) struct_FILE.h (6)
331               decl_line            (data1) 93
332               decl_column          (data1) 20
333               type                 (ref4) [   257]
334               data_member_location (data1) 168
335 [   203]      member               abbrev: 9
336               name                 (strp) "_freeres_buf"
337               decl_file            (data1) struct_FILE.h (6)
338               decl_line            (data1) 94
339               decl_column          (data1) 9
340               type                 (ref4) [    85]
341               data_member_location (data1) 176
342 [   210]      member               abbrev: 9
343               name                 (strp) "__pad5"
344               decl_file            (data1) struct_FILE.h (6)
345               decl_line            (data1) 95
346               decl_column          (data1) 10
347               type                 (ref4) [    a5]
348               data_member_location (data1) 184
349 [   21d]      member               abbrev: 9
350               name                 (strp) "_mode"
351               decl_file            (data1) struct_FILE.h (6)
352               decl_line            (data1) 96
353               decl_column          (data1) 7
354               type                 (ref4) [    53]
355               data_member_location (data1) 192
356 [   22a]      member               abbrev: 9
357               name                 (strp) "_unused2"
358               decl_file            (data1) struct_FILE.h (6)
359               decl_line            (data1) 98
360               decl_column          (data1) 8
361               type                 (ref4) [   289]
362               data_member_location (data1) 196
363 [   238]    typedef              abbrev: 4
364             name                 (strp) "FILE"
365             decl_file            (data1) FILE.h (7)
366             decl_line            (data1) 7
367             decl_column          (data1) 25
368             type                 (ref4) [    b1]
369 [   244]    typedef              abbrev: 10
370             name                 (strp) "_IO_lock_t"
371             decl_file            (data1) struct_FILE.h (6)
372             decl_line            (data1) 43
373             decl_column          (data1) 14
374 [   24c]    structure_type       abbrev: 11
375             name                 (strp) "_IO_marker"
376             declaration          (flag_present) yes
377 [   251]    pointer_type         abbrev: 6
378             byte_size            (data1) 8
379             type                 (ref4) [   24c]
380 [   257]    pointer_type         abbrev: 6
381             byte_size            (data1) 8
382             type                 (ref4) [    b1]
383 [   25d]    array_type           abbrev: 12
384             type                 (ref4) [    8d]
385             sibling              (ref4) [   26d]
386 [   266]      subrange_type        abbrev: 13
387               type                 (ref4) [    3e]
388               upper_bound          (data1) 0
389 [   26d]    pointer_type         abbrev: 6
390             byte_size            (data1) 8
391             type                 (ref4) [   244]
392 [   273]    structure_type       abbrev: 11
393             name                 (strp) "_IO_codecvt"
394             declaration          (flag_present) yes
395 [   278]    pointer_type         abbrev: 6
396             byte_size            (data1) 8
397             type                 (ref4) [   273]
398 [   27e]    structure_type       abbrev: 11
399             name                 (strp) "_IO_wide_data"
400             declaration          (flag_present) yes
401 [   283]    pointer_type         abbrev: 6
402             byte_size            (data1) 8
403             type                 (ref4) [   27e]
404 [   289]    array_type           abbrev: 12
405             type                 (ref4) [    8d]
406             sibling              (ref4) [   299]
407 [   292]      subrange_type        abbrev: 13
408               type                 (ref4) [    3e]
409               upper_bound          (data1) 19
410 [   299]    variable             abbrev: 14
411             name                 (strp) "stdin"
412             decl_file            (data1) stdio.h (8)
413             decl_line            (data1) 137
414             decl_column          (data1) 14
415             type                 (ref4) [   2a5]
416             external             (flag_present) yes
417             declaration          (flag_present) yes
418 [   2a5]    pointer_type         abbrev: 6
419             byte_size            (data1) 8
420             type                 (ref4) [   238]
421 [   2ab]    variable             abbrev: 14
422             name                 (strp) "stdout"
423             decl_file            (data1) stdio.h (8)
424             decl_line            (data1) 138
425             decl_column          (data1) 14
426             type                 (ref4) [   2a5]
427             external             (flag_present) yes
428             declaration          (flag_present) yes
429 [   2b7]    variable             abbrev: 14
430             name                 (strp) "stderr"
431             decl_file            (data1) stdio.h (8)
432             decl_line            (data1) 139
433             decl_column          (data1) 14
434             type                 (ref4) [   2a5]
435             external             (flag_present) yes
436             declaration          (flag_present) yes
437 [   2c3]    variable             abbrev: 14
438             name                 (strp) "sys_nerr"
439             decl_file            (data1) sys_errlist.h (9)
440             decl_line            (data1) 26
441             decl_column          (data1) 12
442             type                 (ref4) [    53]
443             external             (flag_present) yes
444             declaration          (flag_present) yes
445 [   2cf]    array_type           abbrev: 12
446             type                 (ref4) [   2e5]
447             sibling              (ref4) [   2da]
448 [   2d8]      subrange_type        abbrev: 15
449 [   2da]    const_type           abbrev: 7
450             type                 (ref4) [   2cf]
451 [   2df]    pointer_type         abbrev: 6
452             byte_size            (data1) 8
453             type                 (ref4) [    94]
454 [   2e5]    const_type           abbrev: 7
455             type                 (ref4) [   2df]
456 [   2ea]    variable             abbrev: 14
457             name                 (strp) "sys_errlist"
458             decl_file            (data1) sys_errlist.h (9)
459             decl_line            (data1) 27
460             decl_column          (data1) 26
461             type                 (ref4) [   2da]
462             external             (flag_present) yes
463             declaration          (flag_present) yes
464 [   2f6]    base_type            abbrev: 2
465             byte_size            (data1) 8
466             encoding             (data1) signed (5)
467             name                 (strp) "long long int"
468 [   2fd]    base_type            abbrev: 2
469             byte_size            (data1) 8
470             encoding             (data1) unsigned (7)
471             name                 (strp) "long long unsigned int"
472 [   304]    subprogram           abbrev: 16
473             external             (flag_present) yes
474             name                 (strp) "main"
475             decl_file            (data1) primes.c (1)
476             decl_line            (data1) 24
477             decl_column          (data1) 1
478             prototyped           (flag_present) yes
479             type                 (ref4) [    53]
480             ranges               (sec_offset) range list [    50]
481             low_pc               (addr) 000000000000000000
482             frame_base           (exprloc) 
483              [ 0] call_frame_cfa
484             GNU_all_call_sites   (flag_present) yes
485             sibling              (ref4) [   429]
486 [   326]      formal_parameter     abbrev: 17
487               name                 (strp) "argc"
488               decl_file            (data1) primes.c (1)
489               decl_line            (data1) 24
490               decl_column          (data1) 11
491               type                 (ref4) [    53]
492               location             (sec_offset) location list [    10]
493               GNU_locviews         (sec_offset) location list [     0]
494 [   33a]      formal_parameter     abbrev: 17
495               name                 (strp) "argv"
496               decl_file            (data1) primes.c (1)
497               decl_line            (data1) 24
498               decl_column          (data1) 23
499               type                 (ref4) [   429]
500               location             (sec_offset) location list [    72]
501               GNU_locviews         (sec_offset) location list [    3d]
502 [   34e]      variable             abbrev: 18
503               name                 (string) "n"
504               decl_file            (data1) primes.c (1)
505               decl_line            (data1) 28
506               decl_column          (data1) 7
507               type                 (ref4) [    53]
508               location             (sec_offset) location list [    d4]
509               GNU_locviews         (sec_offset) location list [    7a]
510 [   360]      lexical_block        abbrev: 19
511               ranges               (sec_offset) range list [    80]
512               sibling              (ref4) [   3ed]
513 [   369]        variable             abbrev: 18
514                 name                 (string) "i"
515                 decl_file            (data1) primes.c (1)
516                 decl_line            (data1) 29
517                 decl_column          (data1) 17
518                 type                 (ref4) [    99]
519                 location             (sec_offset) location list [   158]
520                 GNU_locviews         (sec_offset) location list [    f5]
521 [   37b]        inlined_subroutine   abbrev: 20
522                 abstract_origin      (ref4) [   42f]
523                 entry_pc             (addr) 0x0000000000400520
524                 GNU_entry_view       (data1) 6
525                 ranges               (sec_offset) range list [    e0]
526                 call_file            (data1) primes.c (1)
527                 call_line            (data1) 31
528                 call_column          (data1) 11
529                 sibling              (ref4) [   3cb]
530 [   394]          formal_parameter     abbrev: 21
531                   abstract_origin      (ref4) [   440]
532                   location             (sec_offset) location list [   1dd]
533                   GNU_locviews         (sec_offset) location list [   186]
534 [   3a1]          inlined_subroutine   abbrev: 22
535                   abstract_origin      (ref4) [   42f]
536                   ranges               (sec_offset) range list [   120]
537                   call_file            (data1) primes.c (1)
538                   call_line            (data1) 7
539                   call_column          (data1) 1
540 [   3ad]            formal_parameter     abbrev: 23
541                     abstract_origin      (ref4) [   440]
542 [   3b2]            lexical_block        abbrev: 24
543                     abstract_origin      (ref4) [   44a]
544                     ranges               (sec_offset) range list [   120]
545 [   3bb]              variable             abbrev: 25
546                       abstract_origin      (ref4) [   44b]
547                       location             (sec_offset) location list [   250]
548                       GNU_locviews         (sec_offset) location list [   203]
549 [   3cb]        GNU_call_site        abbrev: 26
550                 low_pc               (addr) 0x0000000000a000c7 <.annobin_init.c.unlikely.cold.0+0x47>
551                 abstract_origin      (ref4) [   4e2]
552 [   3d8]          GNU_call_site_parameter abbrev: 27
553                   location             (exprloc) 
554                    [ 0] reg5
555                   GNU_call_site_value  (exprloc) 
556                    [ 0] addr 0x400788 <__dso_handle+0x8>
557 [   3e5]          GNU_call_site_parameter abbrev: 27
558                   location             (exprloc) 
559                    [ 0] reg4
560                   GNU_call_site_value  (exprloc) 
561                    [ 0] breg3 -1
562 [   3ed]      inlined_subroutine   abbrev: 28
563               abstract_origin      (ref4) [   45e]
564               entry_pc             (addr) 0x00000000004004fb
565               GNU_entry_view       (data1) 1
566               ranges               (sec_offset) range list [   150]
567               call_file            (data1) primes.c (1)
568               call_line            (data1) 28
569               call_column          (data1) 11
570 [   402]        formal_parameter     abbrev: 21
571                 abstract_origin      (ref4) [   470]
572                 location             (sec_offset) location list [   2ad]
573                 GNU_locviews         (sec_offset) location list [   268]
574 [   40f]        GNU_call_site        abbrev: 26
575                 low_pc               (addr) 0x0000000000a000a4 <.annobin_init.c.unlikely.cold.0+0x24>
576                 abstract_origin      (ref4) [   4ef]
577 [   41c]          GNU_call_site_parameter abbrev: 27
578                   location             (exprloc) 
579                    [ 0] reg4
580                   GNU_call_site_value  (exprloc) 
581                    [ 0] lit0
582 [   421]          GNU_call_site_parameter abbrev: 27
583                   location             (exprloc) 
584                    [ 0] reg1
585                   GNU_call_site_value  (exprloc) 
586                    [ 0] lit10
587 [   429]    pointer_type         abbrev: 6
588             byte_size            (data1) 8
589             type                 (ref4) [    87]
590 [   42f]    subprogram           abbrev: 29
591             external             (flag_present) yes
592             name                 (strp) "is_prime"
593             decl_file            (data1) primes.c (1)
594             decl_line            (data1) 7
595             decl_column          (data1) 1
596             prototyped           (flag_present) yes
597             type                 (ref4) [   457]
598             inline               (data1) inlined (1)
599             sibling              (ref4) [   457]
600 [   440]      formal_parameter     abbrev: 30
601               name                 (string) "n"
602               decl_file            (data1) primes.c (1)
603               decl_line            (data1) 7
604               decl_column          (data1) 20
605               type                 (ref4) [    99]
606 [   44a]      lexical_block        abbrev: 31
607 [   44b]        variable             abbrev: 32
608                 name                 (string) "i"
609                 decl_file            (data1) primes.c (1)
610                 decl_line            (data1) 15
611                 decl_column          (data1) 17
612                 type                 (ref4) [    99]
613 [   457]    base_type            abbrev: 2
614             byte_size            (data1) 1
615             encoding             (data1) boolean (2)
616             name                 (strp) "_Bool"
617 [   45e]    subprogram           abbrev: 33
618             external             (flag_present) yes
619             name                 (strp) "atoi"
620             decl_file            (data1) stdlib.h (2)
621             decl_line            (data2) 361
622             decl_column          (data1) 1
623             prototyped           (flag_present) yes
624             type                 (ref4) [    53]
625             inline               (data1) declared_inlined (3)
626             sibling              (ref4) [   47e]
627 [   470]      formal_parameter     abbrev: 34
628               name                 (strp) "__nptr"
629               decl_file            (data1) stdlib.h (2)
630               decl_line            (data2) 361
631               decl_column          (data1) 1
632               type                 (ref4) [   2df]
633 [   47e]    subprogram           abbrev: 35
634             abstract_origin      (ref4) [   42f]
635             low_pc               (addr) 0x0000000000400680 <is_prime>
636             high_pc              (data8) 101 (0x00000000004006e5)
637             frame_base           (exprloc) 
638              [ 0] call_frame_cfa
639             GNU_all_call_sites   (flag_present) yes
640             sibling              (ref4) [   4e2]
641 [   499]      formal_parameter     abbrev: 36
642               abstract_origin      (ref4) [   440]
643               location             (exprloc) 
644                [ 0] reg5
645 [   4a0]      inlined_subroutine   abbrev: 37
646               abstract_origin      (ref4) [   42f]
647               ranges               (sec_offset) range list [   1a0]
648               low_pc               (addr) 000000000000000000
649               call_file            (data1) primes.c (1)
650               call_line            (data1) 7
651               call_column          (data1) 1
652 [   4b8]        formal_parameter     abbrev: 23
653                 abstract_origin      (ref4) [   440]
654 [   4bd]        lexical_block        abbrev: 38
655                 abstract_origin      (ref4) [   44a]
656                 ranges               (sec_offset) range list [   1a0]
657                 low_pc               (addr) 000000000000000000
658 [   4d2]          variable             abbrev: 25
659                   abstract_origin      (ref4) [   44b]
660                   location             (sec_offset) location list [   2d1]
661                   GNU_locviews         (sec_offset) location list [   28e]
662 [   4e2]    subprogram           abbrev: 39
663             external             (flag_present) yes
664             declaration          (flag_present) yes
665             linkage_name         (strp) "printf"
666             name                 (strp) "printf"
667             decl_file            (data1) stdio.h (8)
668             decl_line            (data2) 332
669             decl_column          (data1) 12
670 [   4ef]    subprogram           abbrev: 40
671             external             (flag_present) yes
672             declaration          (flag_present) yes
673             linkage_name         (strp) "strtol"
674             name                 (strp) "strtol"
675             decl_file            (data1) stdlib.h (2)
676             decl_line            (data1) 176
677             decl_column          (data1) 17
678EOF
679