This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has
- From: Pedro Alves <palves at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, gdb-patches at sourceware dot org
- Date: Tue, 16 Sep 2014 14:27:40 +0100
- Subject: Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has
- Authentication-results: sourceware.org; auth=none
- References: <1410873512-762-1-git-send-email-palves at redhat dot com> <000601cfd1b1$718bd600$54a38200$ at muller@ics-cnrs.unistra.fr>
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