This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]