xref: /aosp_15_r20/external/elfutils/tests/run-readelf-dwz-multi.sh (revision 7304104da70ce23c86437a01be71edd1a2d7f37e)
1*7304104dSAndroid Build Coastguard Worker#! /bin/sh
2*7304104dSAndroid Build Coastguard Worker# Copyright (C) 2012, 2013 Red Hat, Inc.
3*7304104dSAndroid Build Coastguard Worker# This file is part of elfutils.
4*7304104dSAndroid Build Coastguard Worker#
5*7304104dSAndroid Build Coastguard Worker# This file is free software; you can redistribute it and/or modify
6*7304104dSAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by
7*7304104dSAndroid Build Coastguard Worker# the Free Software Foundation; either version 3 of the License, or
8*7304104dSAndroid Build Coastguard Worker# (at your option) any later version.
9*7304104dSAndroid Build Coastguard Worker#
10*7304104dSAndroid Build Coastguard Worker# elfutils is distributed in the hope that it will be useful, but
11*7304104dSAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of
12*7304104dSAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*7304104dSAndroid Build Coastguard Worker# GNU General Public License for more details.
14*7304104dSAndroid Build Coastguard Worker#
15*7304104dSAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
16*7304104dSAndroid Build Coastguard Worker# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17*7304104dSAndroid Build Coastguard Worker
18*7304104dSAndroid Build Coastguard Worker. $srcdir/test-subr.sh
19*7304104dSAndroid Build Coastguard Worker
20*7304104dSAndroid Build Coastguard Worker# common.h
21*7304104dSAndroid Build Coastguard Worker#
22*7304104dSAndroid Build Coastguard Worker# #include <stdio.h>
23*7304104dSAndroid Build Coastguard Worker#
24*7304104dSAndroid Build Coastguard Worker# struct foobar
25*7304104dSAndroid Build Coastguard Worker# {
26*7304104dSAndroid Build Coastguard Worker#   int foo;
27*7304104dSAndroid Build Coastguard Worker#   struct foobar *bar;
28*7304104dSAndroid Build Coastguard Worker# };
29*7304104dSAndroid Build Coastguard Worker#
30*7304104dSAndroid Build Coastguard Worker# extern int call_foo(struct foobar *foobar_struct_ptr);
31*7304104dSAndroid Build Coastguard Worker
32*7304104dSAndroid Build Coastguard Worker# main.c
33*7304104dSAndroid Build Coastguard Worker#
34*7304104dSAndroid Build Coastguard Worker# #include "common.h"
35*7304104dSAndroid Build Coastguard Worker#
36*7304104dSAndroid Build Coastguard Worker# int main(int argc, char ** argv)
37*7304104dSAndroid Build Coastguard Worker# {
38*7304104dSAndroid Build Coastguard Worker#   struct foobar b;
39*7304104dSAndroid Build Coastguard Worker#   b.foo = 42;
40*7304104dSAndroid Build Coastguard Worker#   b.bar = &b;
41*7304104dSAndroid Build Coastguard Worker#
42*7304104dSAndroid Build Coastguard Worker#   return call_foo(b.bar);
43*7304104dSAndroid Build Coastguard Worker# }
44*7304104dSAndroid Build Coastguard Worker
45*7304104dSAndroid Build Coastguard Worker# shared.c
46*7304104dSAndroid Build Coastguard Worker#
47*7304104dSAndroid Build Coastguard Worker# #include "common.h"
48*7304104dSAndroid Build Coastguard Worker#
49*7304104dSAndroid Build Coastguard Worker# int call_foo(struct foobar *fb)
50*7304104dSAndroid Build Coastguard Worker# {
51*7304104dSAndroid Build Coastguard Worker#   return fb->bar->foo - 42;
52*7304104dSAndroid Build Coastguard Worker# }
53*7304104dSAndroid Build Coastguard Worker
54*7304104dSAndroid Build Coastguard Worker# gcc -fPIC -g -c -Wall shared.c
55*7304104dSAndroid Build Coastguard Worker# gcc -shared -o libtestfile_multi_shared.so shared.o
56*7304104dSAndroid Build Coastguard Worker# gcc -g -o testfile_multi_main -L. -ltestfile_multi_shared main.c -Wl,-rpath,.
57*7304104dSAndroid Build Coastguard Worker# dwz -m testfile_multi.dwz testfile_multi_main libtestfile_multi_shared.so
58*7304104dSAndroid Build Coastguard Worker
59*7304104dSAndroid Build Coastguard Worker# main.c
60*7304104dSAndroid Build Coastguard Worker#
61*7304104dSAndroid Build Coastguard Worker# struct foobarbaz
62*7304104dSAndroid Build Coastguard Worker# {
63*7304104dSAndroid Build Coastguard Worker#   int counter;
64*7304104dSAndroid Build Coastguard Worker#   char *bookstore;
65*7304104dSAndroid Build Coastguard Worker# };
66*7304104dSAndroid Build Coastguard Worker#
67*7304104dSAndroid Build Coastguard Worker# int
68*7304104dSAndroid Build Coastguard Worker# main (int argc, char **argv)
69*7304104dSAndroid Build Coastguard Worker# {
70*7304104dSAndroid Build Coastguard Worker#   struct foobarbaz fbb;
71*7304104dSAndroid Build Coastguard Worker#   return 0;
72*7304104dSAndroid Build Coastguard Worker# }
73*7304104dSAndroid Build Coastguard Worker
74*7304104dSAndroid Build Coastguard Worker# gcc -g -o testfile-dwzstr main.c
75*7304104dSAndroid Build Coastguard Worker# cp testfile-dwzstr testfile-dwzstr.alt
76*7304104dSAndroid Build Coastguard Worker# dwz -m testfile-dwzstr.multi testfile-dwzstr testfile-dwzstr.alt
77*7304104dSAndroid Build Coastguard Worker
78*7304104dSAndroid Build Coastguard Workertestfiles libtestfile_multi_shared.so testfile_multi_main testfile_multi.dwz
79*7304104dSAndroid Build Coastguard Workertestfiles testfile-dwzstr testfile-dwzstr.multi
80*7304104dSAndroid Build Coastguard Worker
81*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile_multi_main <<\EOF
82*7304104dSAndroid Build Coastguard Worker
83*7304104dSAndroid Build Coastguard WorkerDWARF section [28] '.debug_info' at offset 0x1078:
84*7304104dSAndroid Build Coastguard Worker [Offset]
85*7304104dSAndroid Build Coastguard Worker Compilation unit at offset 0:
86*7304104dSAndroid Build Coastguard Worker Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
87*7304104dSAndroid Build Coastguard Worker [     b]  compile_unit         abbrev: 6
88*7304104dSAndroid Build Coastguard Worker           producer             (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g"
89*7304104dSAndroid Build Coastguard Worker           language             (data1) C89 (1)
90*7304104dSAndroid Build Coastguard Worker           name                 (strp) "main.c"
91*7304104dSAndroid Build Coastguard Worker           comp_dir             (GNU_strp_alt) "/home/mark/src/tests/dwz"
92*7304104dSAndroid Build Coastguard Worker           low_pc               (addr) 0x00000000004006ac <main>
93*7304104dSAndroid Build Coastguard Worker           high_pc              (udata) 44 (0x00000000004006d8)
94*7304104dSAndroid Build Coastguard Worker           stmt_list            (sec_offset) 0
95*7304104dSAndroid Build Coastguard Worker [    26]    imported_unit        abbrev: 5
96*7304104dSAndroid Build Coastguard Worker             import               (GNU_ref_alt) [     b]
97*7304104dSAndroid Build Coastguard Worker [    2b]    pointer_type         abbrev: 1
98*7304104dSAndroid Build Coastguard Worker             byte_size            (data1) 8
99*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    53]
100*7304104dSAndroid Build Coastguard Worker [    31]    subprogram           abbrev: 3
101*7304104dSAndroid Build Coastguard Worker             external             (flag_present) yes
102*7304104dSAndroid Build Coastguard Worker             name                 (strp) "main"
103*7304104dSAndroid Build Coastguard Worker             decl_file            (data1) main.c (1)
104*7304104dSAndroid Build Coastguard Worker             decl_line            (data1) 3
105*7304104dSAndroid Build Coastguard Worker             prototyped           (flag_present) yes
106*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    3e]
107*7304104dSAndroid Build Coastguard Worker             low_pc               (addr) 0x00000000004006ac <main>
108*7304104dSAndroid Build Coastguard Worker             high_pc              (udata) 44 (0x00000000004006d8)
109*7304104dSAndroid Build Coastguard Worker             frame_base           (exprloc)
110*7304104dSAndroid Build Coastguard Worker              [ 0] call_frame_cfa
111*7304104dSAndroid Build Coastguard Worker             GNU_all_tail_call_sites (flag_present) yes
112*7304104dSAndroid Build Coastguard Worker             sibling              (ref_udata) [    6e]
113*7304104dSAndroid Build Coastguard Worker [    48]      formal_parameter     abbrev: 8
114*7304104dSAndroid Build Coastguard Worker               name                 (strp) "argc"
115*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
116*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
117*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    3e]
118*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
119*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -36
120*7304104dSAndroid Build Coastguard Worker [    56]      formal_parameter     abbrev: 4
121*7304104dSAndroid Build Coastguard Worker               name                 (strp) "argv"
122*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
123*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
124*7304104dSAndroid Build Coastguard Worker               type                 (ref_udata) [    6e]
125*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
126*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -48
127*7304104dSAndroid Build Coastguard Worker [    61]      variable             abbrev: 7
128*7304104dSAndroid Build Coastguard Worker               name                 (string) "b"
129*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
130*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 5
131*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    5a]
132*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
133*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -32
134*7304104dSAndroid Build Coastguard Worker [    6e]    pointer_type         abbrev: 2
135*7304104dSAndroid Build Coastguard Worker             byte_size            (data1) 8
136*7304104dSAndroid Build Coastguard Worker             type                 (ref_udata) [    2b]
137*7304104dSAndroid Build Coastguard WorkerEOF
138*7304104dSAndroid Build Coastguard Worker
139*7304104dSAndroid Build Coastguard Worker# Same as above, but find alt debug file in a .dwz subdir.
140*7304104dSAndroid Build Coastguard Workermkdir .dwz
141*7304104dSAndroid Build Coastguard Workermv testfile_multi.dwz .dwz
142*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile_multi_main <<\EOF
143*7304104dSAndroid Build Coastguard Worker
144*7304104dSAndroid Build Coastguard WorkerDWARF section [28] '.debug_info' at offset 0x1078:
145*7304104dSAndroid Build Coastguard Worker [Offset]
146*7304104dSAndroid Build Coastguard Worker Compilation unit at offset 0:
147*7304104dSAndroid Build Coastguard Worker Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
148*7304104dSAndroid Build Coastguard Worker [     b]  compile_unit         abbrev: 6
149*7304104dSAndroid Build Coastguard Worker           producer             (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g"
150*7304104dSAndroid Build Coastguard Worker           language             (data1) C89 (1)
151*7304104dSAndroid Build Coastguard Worker           name                 (strp) "main.c"
152*7304104dSAndroid Build Coastguard Worker           comp_dir             (GNU_strp_alt) "/home/mark/src/tests/dwz"
153*7304104dSAndroid Build Coastguard Worker           low_pc               (addr) 0x00000000004006ac <main>
154*7304104dSAndroid Build Coastguard Worker           high_pc              (udata) 44 (0x00000000004006d8)
155*7304104dSAndroid Build Coastguard Worker           stmt_list            (sec_offset) 0
156*7304104dSAndroid Build Coastguard Worker [    26]    imported_unit        abbrev: 5
157*7304104dSAndroid Build Coastguard Worker             import               (GNU_ref_alt) [     b]
158*7304104dSAndroid Build Coastguard Worker [    2b]    pointer_type         abbrev: 1
159*7304104dSAndroid Build Coastguard Worker             byte_size            (data1) 8
160*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    53]
161*7304104dSAndroid Build Coastguard Worker [    31]    subprogram           abbrev: 3
162*7304104dSAndroid Build Coastguard Worker             external             (flag_present) yes
163*7304104dSAndroid Build Coastguard Worker             name                 (strp) "main"
164*7304104dSAndroid Build Coastguard Worker             decl_file            (data1) main.c (1)
165*7304104dSAndroid Build Coastguard Worker             decl_line            (data1) 3
166*7304104dSAndroid Build Coastguard Worker             prototyped           (flag_present) yes
167*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    3e]
168*7304104dSAndroid Build Coastguard Worker             low_pc               (addr) 0x00000000004006ac <main>
169*7304104dSAndroid Build Coastguard Worker             high_pc              (udata) 44 (0x00000000004006d8)
170*7304104dSAndroid Build Coastguard Worker             frame_base           (exprloc)
171*7304104dSAndroid Build Coastguard Worker              [ 0] call_frame_cfa
172*7304104dSAndroid Build Coastguard Worker             GNU_all_tail_call_sites (flag_present) yes
173*7304104dSAndroid Build Coastguard Worker             sibling              (ref_udata) [    6e]
174*7304104dSAndroid Build Coastguard Worker [    48]      formal_parameter     abbrev: 8
175*7304104dSAndroid Build Coastguard Worker               name                 (strp) "argc"
176*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
177*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
178*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    3e]
179*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
180*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -36
181*7304104dSAndroid Build Coastguard Worker [    56]      formal_parameter     abbrev: 4
182*7304104dSAndroid Build Coastguard Worker               name                 (strp) "argv"
183*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
184*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
185*7304104dSAndroid Build Coastguard Worker               type                 (ref_udata) [    6e]
186*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
187*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -48
188*7304104dSAndroid Build Coastguard Worker [    61]      variable             abbrev: 7
189*7304104dSAndroid Build Coastguard Worker               name                 (string) "b"
190*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
191*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 5
192*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    5a]
193*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
194*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -32
195*7304104dSAndroid Build Coastguard Worker [    6e]    pointer_type         abbrev: 2
196*7304104dSAndroid Build Coastguard Worker             byte_size            (data1) 8
197*7304104dSAndroid Build Coastguard Worker             type                 (ref_udata) [    2b]
198*7304104dSAndroid Build Coastguard WorkerEOF
199*7304104dSAndroid Build Coastguard Workermv .dwz/testfile_multi.dwz .
200*7304104dSAndroid Build Coastguard Workerrmdir .dwz
201*7304104dSAndroid Build Coastguard Worker
202*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
203*7304104dSAndroid Build Coastguard Worker
204*7304104dSAndroid Build Coastguard WorkerDWARF section [25] '.debug_info' at offset 0x106c:
205*7304104dSAndroid Build Coastguard Worker [Offset]
206*7304104dSAndroid Build Coastguard Worker Compilation unit at offset 0:
207*7304104dSAndroid Build Coastguard Worker Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
208*7304104dSAndroid Build Coastguard Worker [     b]  compile_unit         abbrev: 3
209*7304104dSAndroid Build Coastguard Worker           producer             (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC"
210*7304104dSAndroid Build Coastguard Worker           language             (data1) C89 (1)
211*7304104dSAndroid Build Coastguard Worker           name                 (strp) "shared.c"
212*7304104dSAndroid Build Coastguard Worker           comp_dir             (GNU_strp_alt) "/home/mark/src/tests/dwz"
213*7304104dSAndroid Build Coastguard Worker           low_pc               (addr) +0x0000000000000670 <call_foo>
214*7304104dSAndroid Build Coastguard Worker           high_pc              (udata) 23 (+0x0000000000000687)
215*7304104dSAndroid Build Coastguard Worker           stmt_list            (sec_offset) 0
216*7304104dSAndroid Build Coastguard Worker [    26]    imported_unit        abbrev: 2
217*7304104dSAndroid Build Coastguard Worker             import               (GNU_ref_alt) [     b]
218*7304104dSAndroid Build Coastguard Worker [    2b]    subprogram           abbrev: 1
219*7304104dSAndroid Build Coastguard Worker             external             (flag_present) yes
220*7304104dSAndroid Build Coastguard Worker             name                 (strp) "call_foo"
221*7304104dSAndroid Build Coastguard Worker             decl_file            (data1) shared.c (1)
222*7304104dSAndroid Build Coastguard Worker             decl_line            (data1) 3
223*7304104dSAndroid Build Coastguard Worker             prototyped           (flag_present) yes
224*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    3e]
225*7304104dSAndroid Build Coastguard Worker             low_pc               (addr) +0x0000000000000670 <call_foo>
226*7304104dSAndroid Build Coastguard Worker             high_pc              (udata) 23 (+0x0000000000000687)
227*7304104dSAndroid Build Coastguard Worker             frame_base           (exprloc)
228*7304104dSAndroid Build Coastguard Worker              [ 0] call_frame_cfa
229*7304104dSAndroid Build Coastguard Worker             GNU_all_call_sites   (flag_present) yes
230*7304104dSAndroid Build Coastguard Worker [    41]      formal_parameter     abbrev: 4
231*7304104dSAndroid Build Coastguard Worker               name                 (string) "fb"
232*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) shared.c (1)
233*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
234*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    76]
235*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
236*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -24
237*7304104dSAndroid Build Coastguard WorkerEOF
238*7304104dSAndroid Build Coastguard Worker
239*7304104dSAndroid Build Coastguard Worker# Same as above, but find alt debug file in a .dwz subdir.
240*7304104dSAndroid Build Coastguard Workermkdir .dwz
241*7304104dSAndroid Build Coastguard Workermv testfile_multi.dwz .dwz
242*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
243*7304104dSAndroid Build Coastguard Worker
244*7304104dSAndroid Build Coastguard WorkerDWARF section [25] '.debug_info' at offset 0x106c:
245*7304104dSAndroid Build Coastguard Worker [Offset]
246*7304104dSAndroid Build Coastguard Worker Compilation unit at offset 0:
247*7304104dSAndroid Build Coastguard Worker Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
248*7304104dSAndroid Build Coastguard Worker [     b]  compile_unit         abbrev: 3
249*7304104dSAndroid Build Coastguard Worker           producer             (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC"
250*7304104dSAndroid Build Coastguard Worker           language             (data1) C89 (1)
251*7304104dSAndroid Build Coastguard Worker           name                 (strp) "shared.c"
252*7304104dSAndroid Build Coastguard Worker           comp_dir             (GNU_strp_alt) "/home/mark/src/tests/dwz"
253*7304104dSAndroid Build Coastguard Worker           low_pc               (addr) +0x0000000000000670 <call_foo>
254*7304104dSAndroid Build Coastguard Worker           high_pc              (udata) 23 (+0x0000000000000687)
255*7304104dSAndroid Build Coastguard Worker           stmt_list            (sec_offset) 0
256*7304104dSAndroid Build Coastguard Worker [    26]    imported_unit        abbrev: 2
257*7304104dSAndroid Build Coastguard Worker             import               (GNU_ref_alt) [     b]
258*7304104dSAndroid Build Coastguard Worker [    2b]    subprogram           abbrev: 1
259*7304104dSAndroid Build Coastguard Worker             external             (flag_present) yes
260*7304104dSAndroid Build Coastguard Worker             name                 (strp) "call_foo"
261*7304104dSAndroid Build Coastguard Worker             decl_file            (data1) shared.c (1)
262*7304104dSAndroid Build Coastguard Worker             decl_line            (data1) 3
263*7304104dSAndroid Build Coastguard Worker             prototyped           (flag_present) yes
264*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    3e]
265*7304104dSAndroid Build Coastguard Worker             low_pc               (addr) +0x0000000000000670 <call_foo>
266*7304104dSAndroid Build Coastguard Worker             high_pc              (udata) 23 (+0x0000000000000687)
267*7304104dSAndroid Build Coastguard Worker             frame_base           (exprloc)
268*7304104dSAndroid Build Coastguard Worker              [ 0] call_frame_cfa
269*7304104dSAndroid Build Coastguard Worker             GNU_all_call_sites   (flag_present) yes
270*7304104dSAndroid Build Coastguard Worker [    41]      formal_parameter     abbrev: 4
271*7304104dSAndroid Build Coastguard Worker               name                 (string) "fb"
272*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) shared.c (1)
273*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 3
274*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    76]
275*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
276*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -24
277*7304104dSAndroid Build Coastguard WorkerEOF
278*7304104dSAndroid Build Coastguard Workermv .dwz/testfile_multi.dwz .
279*7304104dSAndroid Build Coastguard Workerrmdir .dwz
280*7304104dSAndroid Build Coastguard Worker
281*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-dwzstr <<\EOF
282*7304104dSAndroid Build Coastguard Worker
283*7304104dSAndroid Build Coastguard WorkerDWARF section [28] '.debug_info' at offset 0x1088:
284*7304104dSAndroid Build Coastguard Worker [Offset]
285*7304104dSAndroid Build Coastguard Worker Compilation unit at offset 0:
286*7304104dSAndroid Build Coastguard Worker Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
287*7304104dSAndroid Build Coastguard Worker [     b]  compile_unit         abbrev: 5
288*7304104dSAndroid Build Coastguard Worker           producer             (GNU_strp_alt) "GNU C 4.7.2 20121109 (Red Hat 4.7.2-8) -mtune=generic -march=x86-64 -g"
289*7304104dSAndroid Build Coastguard Worker           language             (data1) C89 (1)
290*7304104dSAndroid Build Coastguard Worker           name                 (GNU_strp_alt) "main.c"
291*7304104dSAndroid Build Coastguard Worker           comp_dir             (GNU_strp_alt) "/home/mark/src/tests"
292*7304104dSAndroid Build Coastguard Worker           low_pc               (addr) 0x00000000004004ec <main>
293*7304104dSAndroid Build Coastguard Worker           high_pc              (udata) 18 (0x00000000004004fe)
294*7304104dSAndroid Build Coastguard Worker           stmt_list            (sec_offset) 0
295*7304104dSAndroid Build Coastguard Worker [    26]    imported_unit        abbrev: 2
296*7304104dSAndroid Build Coastguard Worker             import               (GNU_ref_alt) [     b]
297*7304104dSAndroid Build Coastguard Worker [    2b]    subprogram           abbrev: 4
298*7304104dSAndroid Build Coastguard Worker             external             (flag_present) yes
299*7304104dSAndroid Build Coastguard Worker             name                 (GNU_strp_alt) "main"
300*7304104dSAndroid Build Coastguard Worker             decl_file            (data1) main.c (1)
301*7304104dSAndroid Build Coastguard Worker             decl_line            (data1) 8
302*7304104dSAndroid Build Coastguard Worker             prototyped           (flag_present) yes
303*7304104dSAndroid Build Coastguard Worker             type                 (GNU_ref_alt) [    30]
304*7304104dSAndroid Build Coastguard Worker             low_pc               (addr) 0x00000000004004ec <main>
305*7304104dSAndroid Build Coastguard Worker             high_pc              (udata) 18 (0x00000000004004fe)
306*7304104dSAndroid Build Coastguard Worker             frame_base           (exprloc)
307*7304104dSAndroid Build Coastguard Worker              [ 0] call_frame_cfa
308*7304104dSAndroid Build Coastguard Worker             GNU_all_call_sites   (flag_present) yes
309*7304104dSAndroid Build Coastguard Worker [    41]      formal_parameter     abbrev: 1
310*7304104dSAndroid Build Coastguard Worker               name                 (GNU_strp_alt) "argc"
311*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
312*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 8
313*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    30]
314*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
315*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -36
316*7304104dSAndroid Build Coastguard Worker [    4f]      formal_parameter     abbrev: 1
317*7304104dSAndroid Build Coastguard Worker               name                 (GNU_strp_alt) "argv"
318*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
319*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 8
320*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    41]
321*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
322*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -48
323*7304104dSAndroid Build Coastguard Worker [    5d]      variable             abbrev: 3
324*7304104dSAndroid Build Coastguard Worker               name                 (string) "fbb"
325*7304104dSAndroid Build Coastguard Worker               decl_file            (data1) main.c (1)
326*7304104dSAndroid Build Coastguard Worker               decl_line            (data1) 10
327*7304104dSAndroid Build Coastguard Worker               type                 (GNU_ref_alt) [    14]
328*7304104dSAndroid Build Coastguard Worker               location             (exprloc)
329*7304104dSAndroid Build Coastguard Worker                [ 0] fbreg -32
330*7304104dSAndroid Build Coastguard WorkerEOF
331*7304104dSAndroid Build Coastguard Worker
332*7304104dSAndroid Build Coastguard Workerexit 0
333