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 was written by Pierre Muller. (muller@ics.u-strasbg.fr) | 16 # This file was written by Pierre Muller. (muller@ics.u-strasbg.fr) |
17 | 17 |
18 if $tracelevel then { | |
19 strace $tracelevel | |
20 } | |
21 | |
22 | 18 |
23 set testfile "watchpoints" | 19 set testfile "watchpoints" |
24 set srcfile ${testfile}.c | 20 set srcfile ${testfile}.c |
25 set binfile ${objdir}/${subdir}/${testfile} | 21 set binfile ${objdir}/${subdir}/${testfile} |
26 | 22 |
27 set wp_set 1 | 23 set wp_set 1 |
28 | 24 |
29 if [get_compiler_info ${binfile}] { | 25 if [get_compiler_info] { |
30 return -1 | 26 return -1 |
31 } | 27 } |
32 | 28 |
33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 29 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
34 untested watchpoint.exp | 30 untested watchpoint.exp |
35 return -1 | 31 return -1 |
36 } | 32 } |
37 | 33 |
38 # Start with a fresh gdb. | 34 # Start with a fresh gdb. |
39 | 35 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 91 |
96 # Continue until the next change, from 3 to 4. | 92 # Continue until the next change, from 3 to 4. |
97 # Note that this one is outside the loop. | 93 # Note that this one is outside the loop. |
98 | 94 |
99 gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 3.*New valu
e = 4.*ival3 = count; ival4 = count;.*" "watchpoint hit, fifth time" | 95 gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 3.*New valu
e = 4.*ival3 = count; ival4 = count;.*" "watchpoint hit, fifth time" |
100 | 96 |
101 # Check that the hit count is reported correctly | 97 # Check that the hit count is reported correctly |
102 gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[
\t]+breakpoint already hit 5 times.*" "Watchpoint hit count is 5" | 98 gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[
\t]+breakpoint already hit 5 times.*" "Watchpoint hit count is 5" |
103 | 99 |
104 set timeout $prev_timeout | 100 set timeout $prev_timeout |
OLD | NEW |