blob: 8f1bf0e3652ea578bff73a92457e94187922046e [file] [log] [blame]
Roland McGrathf5fda7d2005-08-18 22:01:57 +00001#! /bin/sh
Mark Wielaardf8198f22014-12-27 16:16:29 +01002# Copyright (C) 2005, 2014 Red Hat, Inc.
Mark Wielaardde2ed972012-06-05 17:15:16 +02003# This file is part of elfutils.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00004#
Mark Wielaardde2ed972012-06-05 17:15:16 +02005# 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.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00009#
Mark Wielaardde2ed972012-06-05 17:15:16 +020010# elfutils is distributed in the hope that it will be useful, but
Ulrich Drepper361df7d2006-04-04 21:38:57 +000011# WITHOUT ANY WARRANTY; without even the implied warranty of
Mark Wielaardde2ed972012-06-05 17:15:16 +020012# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000014#
Mark Wielaardde2ed972012-06-05 17:15:16 +020015# 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/>.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000017
Roland McGrath1b8b4462005-11-16 01:33:38 +000018. $srcdir/test-subr.sh
Roland McGrathf5fda7d2005-08-18 22:01:57 +000019
Roland McGrath1b8b4462005-11-16 01:33:38 +000020testfiles testfile22
Roland McGrathf5fda7d2005-08-18 22:01:57 +000021
Mark Wielaard86be7922013-04-26 23:44:25 +020022testrun_compare ${abs_builddir}/addrscopes -e testfile22 0x8048353 <<\EOF
Roland McGrathf5fda7d2005-08-18 22:01:57 +0000230x8048353:
Mark Wielaardf8198f22014-12-27 16:16:29 +010024 tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837c (tests/foo.c:16)
Roland McGrathf5fda7d2005-08-18 22:01:57 +000025 global [ be]
Mark Wielaardf8198f22014-12-27 16:16:29 +010026 function (0x2e): 0x8048348 (tests/foo.c:5) .. 0x8048359 (tests/foo.c:11)
Roland McGrathf5fda7d2005-08-18 22:01:57 +000027 local [ 8f]
28EOF
29
Roland McGrath1b8b4462005-11-16 01:33:38 +000030test_cleanup
Roland McGrathf5fda7d2005-08-18 22:01:57 +000031
Roland McGrath1b8b4462005-11-16 01:33:38 +000032testfiles testfile24
Mark Wielaard86be7922013-04-26 23:44:25 +020033testrun_compare ${abs_builddir}/addrscopes -e testfile24 0x804834e <<\EOF
Roland McGrath71e15a02005-08-27 10:33:26 +0000340x804834e:
Mark Wielaardf8198f22014-12-27 16:16:29 +010035 inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048360 (/home/roland/build/stock-elfutils/inline-test.c:16)
36 add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x804834f
Roland McGrath71e15a02005-08-27 10:33:26 +000037 y [ 9d]
38 x [ a2]
39 x (abstract)
40 y (abstract)
41EOF
42
Roland McGrathf5fda7d2005-08-18 22:01:57 +000043exit 0