* How to use gdbserver for X86 host with arm-linux target ?
@ 2011-09-12 11:25 karl leplat
2011-09-12 13:48 ` Pedro Alves
0 siblings, 1 reply; 6+ messages in thread
From: karl leplat @ 2011-09-12 11:25 UTC (permalink / raw)
To: gdb
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 ? Is there a solution ?
Best regards,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to use gdbserver for X86 host with arm-linux target ?
2011-09-12 11:25 How to use gdbserver for X86 host with arm-linux target ? karl leplat
@ 2011-09-12 13:48 ` Pedro Alves
2011-09-12 17:24 ` Ulrich Weigand
2011-09-13 17:28 ` Doug Evans
0 siblings, 2 replies; 6+ messages in thread
From: Pedro Alves @ 2011-09-12 13:48 UTC (permalink / raw)
To: gdb; +Cc: karl leplat
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.
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to use gdbserver for X86 host with arm-linux target ?
2011-09-12 13:48 ` Pedro Alves
@ 2011-09-12 17:24 ` Ulrich Weigand
2011-09-13 17:28 ` Doug Evans
1 sibling, 0 replies; 6+ messages in thread
From: Ulrich Weigand @ 2011-09-12 17:24 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb, karl leplat
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to use gdbserver for X86 host with arm-linux target ?
2011-09-12 13:48 ` Pedro Alves
2011-09-12 17:24 ` Ulrich Weigand
@ 2011-09-13 17:28 ` Doug Evans
2011-09-14 12:27 ` Ulrich Weigand
2011-09-14 19:36 ` Stan Shebs
1 sibling, 2 replies; 6+ messages in thread
From: Doug Evans @ 2011-09-13 17:28 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb, karl leplat
On Mon, Sep 12, 2011 at 6:48 AM, Pedro Alves <pedro@codesourcery.com> 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.
Seems like this another example where gdb suffers from having two code
bases (gdb, gdbserver) to implement the same functionality.
[always on the lookout for such things ...]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to use gdbserver for X86 host with arm-linux target ?
2011-09-13 17:28 ` Doug Evans
@ 2011-09-14 12:27 ` Ulrich Weigand
2011-09-14 19:36 ` Stan Shebs
1 sibling, 0 replies; 6+ messages in thread
From: Ulrich Weigand @ 2011-09-14 12:27 UTC (permalink / raw)
To: Doug Evans; +Cc: Pedro Alves, gdb, karl leplat
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to use gdbserver for X86 host with arm-linux target ?
2011-09-13 17:28 ` Doug Evans
2011-09-14 12:27 ` Ulrich Weigand
@ 2011-09-14 19:36 ` Stan Shebs
1 sibling, 0 replies; 6+ messages in thread
From: Stan Shebs @ 2011-09-14 19:36 UTC (permalink / raw)
To: gdb
On 9/13/11 10:28 AM, Doug Evans wrote:
> [...]
> Seems like this another example where gdb suffers from having two code
> bases (gdb, gdbserver) to implement the same functionality.
>
Ironically, any discussion of sharing vs duplication would have been
happening a few dozen steps away from where you and I were sitting at
Cygnus back in 1993. :-)
I don't remember if there was much talk about it back then, but if there
was, it probably seemed like an impossibility, especially considering
the shoestring that Cygnus operated on at the time. The whole idea of a
target vector interface was still pretty new, and control flow was in
reality much more intertwined and config-macro-dependent than the target
vector pretended.
I think all new debugger designs are separating the low-level inferior
control sufficiently to build debugger and server using the same code if
desired.
Stan
stan@codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-14 19:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 11:25 How to use gdbserver for X86 host with arm-linux target ? karl leplat
2011-09-12 13:48 ` Pedro Alves
2011-09-12 17:24 ` Ulrich Weigand
2011-09-13 17:28 ` Doug Evans
2011-09-14 12:27 ` Ulrich Weigand
2011-09-14 19:36 ` Stan Shebs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox