Re: software watchpoints bug (was: Re: x86 watchpoints bug)

Thiago Jung Bauermann
2011-07-27T01:29:31Z

On Tue, 2011-07-26 at 20:46 +0100, Pedro Alves wrote:
> On Saturday 23 July 2011 03:38:55, Thiago Jung Bauermann wrote:
> > On Fri, 2011-07-22 at 17:40 +0100, Pedro Alves wrote:
>
> > > Maybe better would be to change works_in_software_mode_watchpoint to:
> > >
> > > int
> > > works_in_software_mode_watchpoint (const struct breakpoint *b)
> > > {
> > > - return b->type == bp_hardware_watchpoint;
> > > + return (b->type == bp_watchpoint || b->type == bp_hardware_watchpoint);
> > > }
> >
> > Agreed. I would only comment that the parenthesis are not necessary. :-)
>
> Alright! :-) I've applied the patch below, which does that, and
> adds a new test.

Great, thanks for the patch.

> > Theoretically resources_needed_watchpoint would have to be adapted for
> > software watchpoints too, but in practice that function is only called
> > in hw_watchpoint_used_count, which is never called with bp_watchpoint as
> > an argument.
> >
> > FWIW, my local branch with my rework of debug registers accounting
> > doesn't have hw_watchpoint_used_count anymore.
>
> Oooh! Is that branch somewhere public?

Not yet. I think I just finished ironing out the bugs from my changes
related to watchpoints. I'm now starting to work on breakpoints.

I was thinking of posting the watchpoints patch as an RFC. I'll rebase
the branch on top of current master to get your breakpoint_ops changes
(great work BTW) and post it.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center