Re: How to use gdbserver for X86 host with arm-linux target ?

Ulrich Weigand
2011-09-14T12:27:52Z

Doug Evans wrote:
> On Mon, Sep 12, 2011 at 6:48 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> > There's code in native arm port of gdb to support hardware breakpoints
> > and watchpoints (arm-linux-nat.c). =A0Someone interested should be able
> > to port it to gdbserver.
>
> Seems like this another example where gdb suffers from having two code
> bases (gdb, gdbserver) to implement the same functionality.

Yes. What I'd really like to see in the long term would be to move
gdbserver over to use the same "struct target_ops" interface as GDB
to talk to its platform back ends, and then provide native targets
as stand-alone implementations of that interface that can be linked
with both GDB and gdbserver. The remote protocol would then become
a 1:1 marshalling of target_ops ...

But that's a significant effort, and would require a bit of cleanup
of target_ops first, I guess.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com