This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Date: Sat, 16 Oct 2010 18:43:42 +0100
- Subject: Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops
- References: <1282074071.2606.702.camel@hactar>
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