Re: [patch] Fix hw watchpoints regression on i386/x86_64/ia64

Ulrich Weigand
2008-12-17T20:13:01Z

Jan Kratochvil wrote:

> 2008-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Fix hw watchpoints created before the inferior was started.
> * breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
> bp_hardware_watchpoint types according to the current runtime state.
>
> 2008-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-hw.c: New.

This seems reasonable to me. One minor issue:

> + /* Hack around 'unused var' error for some targets here. */
> + (void) i;

Is this really necessary? The other callers of
TARGET_CAN_USE_HARDWARE_WATCHPOINT don't do that either ...

> +if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] && ![istarget "ia64-*-*"]
> + && ![istarget "s390*-*-*"]} then {
> + verbose "Skipping watchpoint-hw test."
> + return
> +}

This test case should respect [target_info exists gdb,no_hardware_watchpoints].

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com