Brian Silverman | 8649792 | 2018-02-10 19:28:39 -0500 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | # Copyright (C) 2015 Red Hat, Inc. |
| 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 | if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then |
| 19 | echo "demangler unsupported" |
| 20 | exit 77 |
| 21 | fi |
| 22 | |
| 23 | . $srcdir/test-subr.sh |
| 24 | |
| 25 | # See run-addr2line-i-test.sh for how to generate test files. |
| 26 | testfiles testfile-inlines |
| 27 | |
| 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 |
| 30 | foobar |
| 31 | /tmp/x.cpp:5 |
| 32 | foobar |
| 33 | /tmp/x.cpp:6 |
| 34 | fubar |
| 35 | /tmp/x.cpp:10 |
| 36 | fubar |
| 37 | /tmp/x.cpp:11 |
| 38 | foobar inlined at /tmp/x.cpp:15 in bar() |
| 39 | /tmp/x.cpp:5 |
| 40 | bar |
| 41 | /tmp/x.cpp:15 |
| 42 | fubar inlined at /tmp/x.cpp:20 in baz() |
| 43 | /tmp/x.cpp:10 |
| 44 | baz |
| 45 | /tmp/x.cpp:20 |
| 46 | foobar inlined at /tmp/x.cpp:15 in foo() |
| 47 | /tmp/x.cpp:5 |
| 48 | bar |
| 49 | /tmp/x.cpp:15 |
| 50 | foo() |
| 51 | /tmp/x.cpp:25 |
| 52 | fubar inlined at /tmp/x.cpp:20 in foo() |
| 53 | /tmp/x.cpp:10 |
| 54 | baz |
| 55 | /tmp/x.cpp:20 |
| 56 | foo() |
| 57 | /tmp/x.cpp:26 |
| 58 | fu() |
| 59 | /tmp/x.cpp:31 |
| 60 | fubar inlined at /tmp/x.cpp:32 in fu() |
| 61 | /tmp/x.cpp:10 |
| 62 | fu() |
| 63 | /tmp/x.cpp:32 |
| 64 | foobar inlined at /tmp/x.cpp:33 in fu() |
| 65 | /tmp/x.cpp:5 |
| 66 | fu() |
| 67 | /tmp/x.cpp:33 |
| 68 | EOF |
| 69 | |
| 70 | exit 0 |