2 # Copyright (C) 2007, 2008 Red Hat, Inc.
3 # This file is part of Red Hat elfutils.
5 # Red Hat elfutils is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; version 2 of the License.
9 # Red Hat elfutils is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with Red Hat elfutils; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
18 # Red Hat elfutils is an included package of the Open Invention Network.
19 # An included package of the Open Invention Network is a package for which
20 # Open Invention Network licensees cross-license their patents. No patent
21 # license is granted, either expressly or impliedly, by designation as an
22 # included package. Should you wish to participate in the Open Invention
23 # Network licensing program, please visit www.openinventionnetwork.com
24 # <http://www.openinventionnetwork.com>.
26 . $srcdir/test-subr.sh
28 testfiles testfile34 testfile38 testfile41 testfile49
30 testrun_compare ../src/addr2line -f -e testfile34 \
31 0x08048074 0x08048075 0x08048076 \
32 0x08049078 0x08048080 0x08049080 <<\EOF
47 testrun_compare ../src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF
58 testrun_compare ../src/addr2line -S -e testfile41 0x1 0x104 <<\EOF
59 small_global_at_large_global+0x1
61 small_global_first_at_large_global+0x1
65 testfiles testfile12 testfile14
69 00400000-00401000 r-xp 00000000 fd:01 4006812 `pwd`/testfile14
70 00500000-00501000 rw-p 00000000 fd:01 4006812 `pwd`/testfile14
71 01000000-01001000 r-xp 00000000 fd:01 1234567 `pwd`/testfile12
72 01100000-01011000 rw-p 00000000 fd:01 1234567 `pwd`/testfile12
73 2aaaaaaab000-2aaaaaaad000 rw-p 2aaaaaaab000 00:00 0
74 2aaaaaae2000-2aaaaaae3000 rw-p 2aaaaaae2000 00:00 0
75 7fff61068000-7fff6107d000 rw-p 7ffffffea000 00:00 0 [stack]
76 7fff611fe000-7fff61200000 r-xp 7fff611fe000 00:00 0 [vdso]
77 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
80 testrun_compare ../src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF
82 /home/drepper/local/elfutils-build/20050425/v.c:11
84 /home/drepper/local/elfutils-build/20030710/u.c:5
98 # .size sized_bar, . - sized_bar
105 # .globl global_outer
109 # .globl global_in_global
113 # .size global_in_global, . - global_in_global
117 # .size local_in_global, . - local_in_global
123 # .size global_outer, . - global_outer
130 # .globl global_in_local
134 # .size global_in_local, . - global_in_local
138 # .size local_in_local, . - local_in_local
144 # .size local_outer, . - local_outer
146 testrun_compare ../src/addr2line -S -e testfile49 \
147 0 1 2 3 4 5 6 7 8 9 \
148 0x100 0x101 0x102 0x103 0x104 0x105 \
149 0x106 0x107 0x108 0x109 0x10a 0x10b \
150 0x200 0x201 0x202 0x203 0x204 0x205 \
151 0x206 0x207 0x208 0x209 0x20a 0x20b <<\EOF