|
Packit |
032894 |
#! /bin/sh
|
|
Packit |
032894 |
# Copyright (C) 2018 Red Hat, Inc.
|
|
Packit |
032894 |
# This file is part of elfutils.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# This file is free software; you can redistribute it and/or modify
|
|
Packit |
032894 |
# it under the terms of the GNU General Public License as published by
|
|
Packit |
032894 |
# the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
032894 |
# (at your option) any later version.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# elfutils is distributed in the hope that it will be useful, but
|
|
Packit |
032894 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
032894 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
032894 |
# GNU General Public License for more details.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# You should have received a copy of the GNU General Public License
|
|
Packit |
032894 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
032894 |
|
|
Packit |
032894 |
. $srcdir/test-subr.sh
|
|
Packit |
032894 |
|
|
Packit |
032894 |
# See run-dwarf-ranges.sh
|
|
Packit |
032894 |
# Compiled with:
|
|
Packit |
032894 |
# gcc -c -O2 -o testfile-ranges-hello.o -gsplit-dwarf -gdwarf-4 hello.c
|
|
Packit |
032894 |
# gcc -c -O2 -o testfile-ranges-world.o -gsplit-dwarf -gdwarf-4 world.c
|
|
Packit |
032894 |
# gcc -o testfilesplitranges4 -O2 \
|
|
Packit |
032894 |
# testfile-ranges-hello.o testfile-ranges-world.o
|
|
Packit |
032894 |
# eu-strip -f testfilesplitranges4.debug testfilesplitranges4
|
|
Packit |
032894 |
|
|
Packit |
032894 |
testfiles testfilesplitranges4.debug
|
|
Packit |
032894 |
testfiles testfile-ranges-hello.dwo testfile-ranges-world.dwo
|
|
Packit |
032894 |
|
|
Packit |
032894 |
testrun_compare ${abs_builddir}/all-dwarf-ranges testfilesplitranges4.debug <<\EOF
|
|
Packit |
032894 |
die: hello.c (11)
|
|
Packit |
032894 |
4004e0..4004ff
|
|
Packit |
032894 |
4003e0..4003f7
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_say (2e)
|
|
Packit |
032894 |
4004f0..4004ff
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: main (2e)
|
|
Packit |
032894 |
4003e0..4003f7
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: subject (1d)
|
|
Packit |
032894 |
4003e3..4003ef
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: subject (2e)
|
|
Packit |
032894 |
4004e0..4004f0
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: world.c (11)
|
|
Packit |
032894 |
400500..400567
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_main (2e)
|
|
Packit |
032894 |
400550..400567
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_subject (1d)
|
|
Packit |
032894 |
400553..40055f
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: say (2e)
|
|
Packit |
032894 |
400500..400540
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: happy (1d)
|
|
Packit |
032894 |
40051c..400526
|
|
Packit |
032894 |
400530..400534
|
|
Packit |
032894 |
400535..40053f
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: sad (1d)
|
|
Packit |
032894 |
40051c..400526
|
|
Packit |
032894 |
400535..40053f
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_subject (2e)
|
|
Packit |
032894 |
400540..400550
|
|
Packit |
032894 |
|
|
Packit |
032894 |
EOF
|
|
Packit |
032894 |
|
|
Packit |
032894 |
# Same with -gdwarf-5
|
|
Packit |
032894 |
# gcc -c -O2 -o testfile-ranges-hello5.o -gsplit-dwarf -gdwarf-5 hello.c
|
|
Packit |
032894 |
# gcc -c -O2 -o testfile-ranges-world5.o -gsplit-dwarf -gdwarf-5 world.c
|
|
Packit |
032894 |
# gcc -o testfilesplitranges5 -O2 testfile-ranges-hello5.o testfile-ranges-world5.o
|
|
Packit |
032894 |
# eu-strip -f testfilesplitranges5.debug testfilesplitranges5
|
|
Packit |
032894 |
|
|
Packit |
032894 |
testfiles testfilesplitranges5.debug
|
|
Packit |
032894 |
testfiles testfile-ranges-hello5.dwo testfile-ranges-world5.dwo
|
|
Packit |
032894 |
|
|
Packit |
032894 |
testrun_compare ${abs_builddir}/all-dwarf-ranges testfilesplitranges5.debug <<\EOF
|
|
Packit |
032894 |
die: hello.c (11)
|
|
Packit |
032894 |
401150..40117a
|
|
Packit |
032894 |
401050..401067
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_say (2e)
|
|
Packit |
032894 |
401160..40117a
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: main (2e)
|
|
Packit |
032894 |
401050..401067
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: subject (1d)
|
|
Packit |
032894 |
401053..40105f
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: subject (2e)
|
|
Packit |
032894 |
401150..401160
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: world.c (11)
|
|
Packit |
032894 |
401180..4011e7
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_main (2e)
|
|
Packit |
032894 |
4011d0..4011e7
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_subject (1d)
|
|
Packit |
032894 |
4011d3..4011df
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: say (2e)
|
|
Packit |
032894 |
401180..4011c0
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: happy (1d)
|
|
Packit |
032894 |
40119b..40119b
|
|
Packit |
032894 |
40119c..4011a6
|
|
Packit |
032894 |
4011b0..4011b4
|
|
Packit |
032894 |
4011b5..4011bf
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: sad (1d)
|
|
Packit |
032894 |
40119b..40119b
|
|
Packit |
032894 |
40119c..4011a6
|
|
Packit |
032894 |
4011b4..4011b4
|
|
Packit |
032894 |
4011b5..4011bf
|
|
Packit |
032894 |
|
|
Packit |
032894 |
die: no_subject (2e)
|
|
Packit |
032894 |
4011c0..4011d0
|
|
Packit |
032894 |
|
|
Packit |
032894 |
EOF
|
|
Packit |
032894 |
|
|
Packit |
032894 |
exit 0
|