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

Pedro Alves
2010-10-16T17:43:53Z

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