OLD | NEW |
1 # Copyright 2008-2012 Free Software Foundation, Inc. | 1 # Copyright 2008-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 # Based on a file written by Fred Fish. (fnf@cygnus.com) | 16 # Based on a file written by Fred Fish. (fnf@cygnus.com) |
17 # This file is part of the GDB testsuite. It tests reverse debugging | 17 # This file is part of the GDB testsuite. It tests reverse debugging |
18 # with watchpoints. | 18 # with watchpoints. |
19 | 19 |
20 | 20 |
21 if ![supports_reverse] { | 21 if ![supports_reverse] { |
22 return | 22 return |
23 } | 23 } |
24 | 24 |
25 set testfile "watch-reverse" | 25 standard_testfile |
26 set srcfile ${testfile}.c | |
27 set binfile ${objdir}/${subdir}/${testfile} | |
28 | 26 |
29 if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { | 27 if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { |
30 return -1 | 28 return -1 |
31 } | 29 } |
32 | 30 |
33 runto main | 31 runto main |
34 | 32 |
35 if [supports_process_record] { | 33 if [supports_process_record] { |
36 # Activate process record/replay | 34 # Activate process record/replay |
37 gdb_test_no_output "record" "Turn on process record" | 35 gdb_test_no_output "record" "Turn on process record" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 gdb_test "continue" \ | 187 gdb_test "continue" \ |
190 ".*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 0.*ival3 = count; ival
4 = count;.*" \ | 188 ".*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 0.*ival3 = count; ival
4 = count;.*" \ |
191 "watchpoint hit in reverse, HW, fourth time" | 189 "watchpoint hit in reverse, HW, fourth time" |
192 | 190 |
193 # Reverse until first change, from 0 to -1 | 191 # Reverse until first change, from 0 to -1 |
194 | 192 |
195 gdb_test "continue" \ | 193 gdb_test "continue" \ |
196 ".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = -1.*ival3 = count; iva
l4 = count;.*" \ | 194 ".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = -1.*ival3 = count; iva
l4 = count;.*" \ |
197 "watchpoint hit in reverse, HW, fifth time" | 195 "watchpoint hit in reverse, HW, fifth time" |
198 | 196 |
OLD | NEW |