Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has

Pedro Alves
2014-09-16T13:27:49Z

On 09/16/2014 02:23 PM, Pierre Muller wrote:
> Hi Pedro,
>
> I think there is a typo inside this:
>> + set sw_watch_pc [get_pc "get sw watchpoint PC"]
>> +
>> + delete_breakpoints
>> +
>> + # Allow hardware watchpoints again.
>> + gdb_test_no_output "set can-use-hw-watchpoints 1"
>> +
>> + gdb_test "watch global" \
>> + "Hardware watchpoint .*: global" \
>> + "set hardware watchpoint on global variable"
>> +
>> + gdb_test "continue" \
>> + "Hardware watchpoint .*: global.*Old value = 1.*New value =
>> 2.*set_global \\(val=2\\).*$srcfile.*" \
>> + "hardware watchpoint triggers"
>> +
>> + set hw_watch_pc [get_pc "get hw watchpoint PC"]
>> +
>> + gdb_assert {$sw_watch_pc == $sw_watch_pc} "hw watchpoint stops at
>> right instruction"
> Shouldn't this be
> {$sw_watch_pc == $hw_watch_pc}?

Argh... Right you are.

Many thanks,
Pedro Alves