[patch 1/2] Convert hardware watchpoints to use breakpoint_ops

Pedro Alves pedro@codesourcery.com
Sat Oct 16 17:43:00 GMT 2010


On Tuesday 17 August 2010 20:41:11, Thiago Jung Bauermann wrote:
>             if (!mem_cnt)
> -             b->type = bp_watchpoint;
> +             {
> +               b->type = bp_watchpoint;
> +
> +               /* When downgrading to a software watchpoint, we have to
> +                  remember the value of the OPS field so that we can restore
> +                  it when upgrading to a hardware watchpoint again.  */
> +               if (b->ops)
> +                 {
> +                   b->old_ops = b->ops;
> +                   b->ops = NULL;
> +                 }

IMO, if you needed this juggling, something is wrong with the design.  :-/

-- 
Pedro Alves



More information about the Gdb-patches mailing list