2 # Copyright (C) 2015 Red Hat, Inc.
3 # This file is part of elfutils.
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.
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.
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/>.
18 if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then
19 echo "demangler unsupported"
23 . $srcdir/test-subr.sh
25 # See run-addr2line-i-test.sh for how to generate test files.
26 testfiles testfile-inlines
28 # All together now plus (demangled) function names.
29 testrun_compare ${abs_top_builddir}/src/addr2line -C -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF
38 foobar inlined at /tmp/x.cpp:15 in bar()
42 fubar inlined at /tmp/x.cpp:20 in baz()
46 foobar inlined at /tmp/x.cpp:15 in foo()
52 fubar inlined at /tmp/x.cpp:20 in foo()
60 fubar inlined at /tmp/x.cpp:32 in fu()
64 foobar inlined at /tmp/x.cpp:33 in fu()