Re: [PATCH 3/3] [PowerPC] Fix debug register issues in ppc-linux-nat

Ulrich Weigand
2019-08-22T10:27:35Z

> > The one question I still have is, given that we'll be deleting the
> > installed breakpoints after a clone/fork anyway, wouldn't it be
> > easier to just *delete* all breakpoints directly at the clone/fork
> > callback and start out the GDB "installed" structures as empty?
> > But that's just a minor detail ... whatever is easier to implement
> > is fine with me.
>
> I think it's easier to do it in prepare_to_resume, since we have to do
> it there anyway to handle hardware breakpoints that were removed by the
> user. I'm also not sure that linux-nat is prepared to take exceptions
> from these callbacks, in case a ptrace call there fails.

OK, makes sense.

> > Since this really seems to be required on PowerPC due to the peculiar
> > ptrace interface, I'm fine with adding the common code clone hook.
>
> Ok. Is it acceptable if linux-low in gdbserver doesn't have the
> equivalent hook? Adding one there would require changing struct
> linux_target_ops and every arch that uses it. This will become
> necessary in the future to enable hardware breakpoints in the ppc server
> stub.

Yes, I'd be fine with adding the hook to gdbserver as well then.

Bye,