2 # Copyright (C) 2007, 2008 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 . $srcdir/test-subr.sh
20 testfiles testfile34 testfile38 testfile41 testfile49
22 testrun_compare ../src/addr2line -f -e testfile34 \
23 0x08048074 0x08048075 0x08048076 \
24 0x08049078 0x08048080 0x08049080 <<\EOF
39 testrun_compare ../src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF
50 testrun_compare ../src/addr2line -S -e testfile41 0x1 0x104 <<\EOF
51 small_global_at_large_global+0x1
53 small_global_first_at_large_global+0x1
57 testfiles testfile12 testfile14
61 00400000-00401000 r-xp 00000000 fd:01 4006812 `pwd`/testfile14
62 00500000-00501000 rw-p 00000000 fd:01 4006812 `pwd`/testfile14
63 01000000-01001000 r-xp 00000000 fd:01 1234567 `pwd`/testfile12
64 01100000-01011000 rw-p 00000000 fd:01 1234567 `pwd`/testfile12
65 2aaaaaaab000-2aaaaaaad000 rw-p 2aaaaaaab000 00:00 0
66 2aaaaaae2000-2aaaaaae3000 rw-p 2aaaaaae2000 00:00 0
67 7fff61068000-7fff6107d000 rw-p 7ffffffea000 00:00 0 [stack]
68 7fff611fe000-7fff61200000 r-xp 7fff611fe000 00:00 0 [vdso]
69 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
72 testrun_compare ../src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF
74 /home/drepper/local/elfutils-build/20050425/v.c:11
76 /home/drepper/local/elfutils-build/20030710/u.c:5
90 # .size sized_bar, . - sized_bar
101 # .globl global_in_global
105 # .size global_in_global, . - global_in_global
109 # .size local_in_global, . - local_in_global
115 # .size global_outer, . - global_outer
122 # .globl global_in_local
126 # .size global_in_local, . - global_in_local
130 # .size local_in_local, . - local_in_local
136 # .size local_outer, . - local_outer
138 testrun_compare ../src/addr2line -S -e testfile49 \
139 0 1 2 3 4 5 6 7 8 9 \
140 0x100 0x101 0x102 0x103 0x104 0x105 \
141 0x106 0x107 0x108 0x109 0x10a 0x10b \
142 0x200 0x201 0x202 0x203 0x204 0x205 \
143 0x206 0x207 0x208 0x209 0x20a 0x20b <<\EOF