OLD | NEW |
1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # This file is part of the GDB testsuite. It tests reverse debugging | 16 # This file is part of the GDB testsuite. It tests reverse debugging |
17 # with shared libraries. | 17 # with shared libraries. |
18 | 18 |
19 if ![supports_reverse] { | 19 if ![supports_reverse] { |
20 return | 20 return |
21 } | 21 } |
22 | 22 |
23 set testfile "solib-reverse" | 23 standard_testfile |
24 set srcfile ${testfile}.c | |
25 set libfile "shr2" | 24 set libfile "shr2" |
26 set libsrc ${libfile}.c | 25 set libsrc ${libfile}.c |
27 set library ${objdir}/${subdir}/${libfile}.sl | 26 set library [standard_output_file ${libfile}.sl] |
28 set binfile ${objdir}/${subdir}/${testfile} | |
29 | 27 |
30 if [get_compiler_info ${binfile}] { | 28 if [get_compiler_info] { |
31 return -1 | 29 return -1 |
32 } | 30 } |
33 | 31 |
34 if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != ""
} { | 32 if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != ""
} { |
35 untested "Could not compile shared library." | 33 untested "Could not compile shared library." |
36 return -1 | 34 return -1 |
37 } | 35 } |
38 | 36 |
39 set exec_opts [list debug shlib=${library}] | 37 set exec_opts [list debug shlib=${library}] |
40 | 38 |
41 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
s] != "" } { | 39 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
s] != "" } { |
42 untested "Could not compile $binfile." | 40 untested "Could not compile $binfile." |
43 return -1 | 41 return -1 |
44 } | 42 } |
45 | 43 |
46 # Start with a fresh gdb. | 44 # Start with a fresh gdb. |
47 | 45 |
48 gdb_exit | 46 gdb_exit |
49 gdb_start | 47 gdb_start |
| 48 |
| 49 # Clear it to never find any separate system debug infos. |
| 50 gdb_test_no_output "set debug-file-directory" |
| 51 |
50 gdb_reinitialize_dir $srcdir/$subdir | 52 gdb_reinitialize_dir $srcdir/$subdir |
51 gdb_load ${binfile} | 53 gdb_load ${binfile} |
52 | 54 |
53 | 55 |
54 runto main | 56 runto main |
55 | 57 |
56 if [supports_process_record] { | 58 if [supports_process_record] { |
57 # Activate process record/replay | 59 # Activate process record/replay |
58 gdb_test_no_output "record" "Turn on process record" | 60 gdb_test_no_output "record" "Turn on process record" |
59 } | 61 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 gdb_test "reverse-step" " begin part two.*" "reverse-step back to main two" | 115 gdb_test "reverse-step" " begin part two.*" "reverse-step back to main two" |
114 | 116 |
115 # | 117 # |
116 # Test reverse-next over debuggable solib function | 118 # Test reverse-next over debuggable solib function |
117 # | 119 # |
118 | 120 |
119 gdb_test "until $end_part_two" " end part two.*" "run until end part two" | 121 gdb_test "until $end_part_two" " end part two.*" "run until end part two" |
120 | 122 |
121 gdb_test "reverse-next" " middle part two.*" "reverse-next over solib function o
ne" | 123 gdb_test "reverse-next" " middle part two.*" "reverse-next over solib function o
ne" |
122 gdb_test "reverse-next" " begin part two.*" "reverse-next over solib function tw
o" | 124 gdb_test "reverse-next" " begin part two.*" "reverse-next over solib function tw
o" |
OLD | NEW |