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

Ulrich Weigand
2011-09-12T17:24:55Z

Pedro Alves wrote:
> On Monday 12 September 2011 12:24:01, karl leplat wrote:
> > Hi,
> >
> > When i inserted a hardware breakpoint, i got the result :
> >
> > Side gdb:
> > Warning:
> > Cannot insert hardware breakpoint 1.
> > Could not insert hardware breakpoints:
> > You may have requested too many hardware breakpoints/watchpoints.
> >
> > Side gdbserver:
> > In the file: "gdbserver/linux-arm-low.c" , i have seen that the target
> > has not registered the function insert_point.
> >
> > Is it normal ?
>
> Yes. The arm-linux gdbserver port was never taught about
> managing breakpoints itself. When that callback is not installed,
> gdb itself inserts breakpoints in program memory, using regular
> memory writes to plant the breakpoint insn.
>
> > Is there a solution ?
>
> There's code in native arm port of gdb to support hardware breakpoints
> and watchpoints (arm-linux-nat.c). Someone interested should be able
> to port it to gdbserver.

As it happens, this is what I've been working on recently. I've just
posted a patch implementing this feature:
http://sourceware.org/ml/gdb-patches/2011-09/msg00200.html

Bye,
Ulrich

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