123
123
".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = -1.*ival3 = count; ival4 = count;.*" \
124
124
"watchpoint hit in reverse, fifth time"
126
gdb_test "set can-use-hw-watchpoints 1" "" "enable hw watchpoints"
132
# FIXME 'set exec-dir' command should give some output so we can test.
133
gdb_test "set exec-direction forward" "" "set forward"
135
# Continue until first change, from -1 to 0
137
gdb_test "continue" \
138
".*\[Ww\]atchpoint.*ival3.*Old value = -1.*New value = 0.*ival3 = count; ival4 = count;.*" \
139
"watchpoint hit, forward replay, first time"
141
# Continue until the next change, from 0 to 1.
142
gdb_test "continue" \
143
".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = 1.*ival3 = count; ival4 = count;.*" \
144
"watchpoint hit, forward replay, second time"
146
# Continue until the next change, from 1 to 2.
147
gdb_test "continue" \
148
".*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 2.*ival3 = count; ival4 = count;.*" \
149
"watchpoint hit, forward replay, third time"
151
# Continue until the next change, from 2 to 3.
152
gdb_test "continue" \
153
".*\[Ww\]atchpoint.*ival3.*Old value = 2.*New value = 3.*ival3 = count; ival4 = count;.*" \
154
"watchpoint hit, forward replay, fourth time"
156
# Continue until the next change, from 3 to 4.
157
# Note that this one is outside the loop.
159
gdb_test "continue" \
160
".*\[Ww\]atchpoint.*ival3.*Old value = 3.*New value = 4.*ival3 = count; ival4 = count;.*" \
161
"watchpoint hit, forward replay, fifth time"
163
# Continue until we hit the finishing marker function.
164
# Make sure we hit no more watchpoints.
166
gdb_test "continue" "marker2 .*" "replay forward to marker2"
172
# FIXME 'set exec-dir' command should give some output so we can test.
173
gdb_test "set exec-direction reverse" "" "set reverse"
175
# Reverse until the previous change, from 4 to 3
176
# Note that this one is outside the loop
178
gdb_test "continue" \
179
".*\[Ww\]atchpoint.*ival3.*Old value = 4.*New value = 3.*ival3 = count; ival4 = count;.*" \
180
"watchpoint hit in reverse, HW, first time"
182
# Reverse until the previous change, from 3 to 2.
183
gdb_test "continue" \
184
".*\[Ww\]atchpoint.*ival3.*Old value = 3.*New value = 2.*ival3 = count; ival4 = count;.*" \
185
"watchpoint hit in reverse, HW, second time"
187
# Reverse until the previous change, from 2 to 1.
188
gdb_test "continue" \
189
".*\[Ww\]atchpoint.*ival3.*Old value = 2.*New value = 1.*ival3 = count; ival4 = count;.*" \
190
"watchpoint hit in reverse, HW, third time"
192
# Reverse until the previous change, from 1 to 0.
193
gdb_test "continue" \
194
".*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 0.*ival3 = count; ival4 = count;.*" \
195
"watchpoint hit in reverse, HW, fourth time"
197
# Reverse until first change, from 0 to -1
199
gdb_test "continue" \
200
".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = -1.*ival3 = count; ival4 = count;.*" \
201
"watchpoint hit in reverse, HW, fifth time"