Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Mark Wielaard | 1b734df | 2013-09-20 09:50:42 -0400 | [diff] [blame] | 2 | # Copyright (C) 2005, 2013 Red Hat, Inc. |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 3 | # This file is part of elfutils. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 4 | # Written by Ulrich Drepper <drepper@redhat.com>, 2005. |
Roland McGrath | 6d0c2e8 | 2006-04-05 00:59:43 +0000 | [diff] [blame] | 5 | # |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 6 | # This file is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 3 of the License, or |
| 9 | # (at your option) any later version. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 10 | # |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 11 | # elfutils is distributed in the hope that it will be useful, but |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 15 | # |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 18 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 19 | . $srcdir/test-subr.sh |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 20 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 21 | testfiles testfile testfile2 testfile8 |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 22 | |
Mark Wielaard | 86be792 | 2013-04-26 23:44:25 +0200 | [diff] [blame] | 23 | testrun_compare ${abs_builddir}/allfcts testfile testfile2 testfile8 <<\EOF |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 24 | /home/drepper/gnu/new-bu/build/ttt/m.c:5:main |
| 25 | /home/drepper/gnu/new-bu/build/ttt/b.c:4:bar |
| 26 | /home/drepper/gnu/new-bu/build/ttt/f.c:3:foo |
| 27 | /shoggoth/drepper/b.c:4:bar |
| 28 | /shoggoth/drepper/f.c:3:foo |
| 29 | /shoggoth/drepper/m.c:5:main |
| 30 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:107:main |
| 31 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:159:print_version |
| 32 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:173:parse_opt |
| 33 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:201:more_help |
| 34 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:217:process_file |
| 35 | /usr/include/sys/stat.h:375:stat64 |
| 36 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:291:crc32_file |
| 37 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:313:handle_elf |
| 38 | EOF |
| 39 | |
Mark Wielaard | 1b734df | 2013-09-20 09:50:42 -0400 | [diff] [blame] | 40 | # = nested_funcs.c = |
| 41 | # |
| 42 | # static int |
| 43 | # foo (int x) |
| 44 | # { |
| 45 | # int bar (int y) |
| 46 | # { |
| 47 | # return x - y; |
| 48 | # } |
| 49 | # |
| 50 | # return bar (x * 2); |
| 51 | # } |
| 52 | # |
| 53 | # int |
| 54 | # main (int argc, char ** argv) |
| 55 | # { |
| 56 | # return foo (argc); |
| 57 | # } |
| 58 | # |
| 59 | # gcc -g -o nested_funcs nested_funcs.c |
| 60 | |
| 61 | # = class_func.cxx = |
| 62 | # |
| 63 | # namespace foobar |
| 64 | # { |
| 65 | # class Foo |
| 66 | # { |
| 67 | # public: |
| 68 | # int bar(int x); |
| 69 | # }; |
| 70 | # |
| 71 | # int Foo::bar(int x) { return x - 42; } |
| 72 | # }; |
| 73 | # |
| 74 | # int |
| 75 | # main (int argc, char **argv) |
| 76 | # { |
| 77 | # foobar::Foo foo; |
| 78 | # |
| 79 | # return foo.bar (42); |
| 80 | # } |
| 81 | # |
| 82 | # clang++ -g -o class_func class_func.cxx |
| 83 | |
| 84 | testfiles testfile_nested_funcs testfile_class_func |
| 85 | |
| 86 | testrun_compare ${abs_builddir}/allfcts testfile_nested_funcs testfile_class_func <<\EOF |
| 87 | /home/mark/src/tests/nested/nested_funcs.c:2:foo |
| 88 | /home/mark/src/tests/nested/nested_funcs.c:4:bar |
| 89 | /home/mark/src/tests/nested/nested_funcs.c:13:main |
| 90 | /home/mark/src/tests/nested/class_func.cxx:6:bar |
| 91 | /home/mark/src/tests/nested/class_func.cxx:13:main |
| 92 | EOF |
| 93 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 94 | exit 0 |