This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Implementation of different software breakpoint kinds in gdb server
- From: Pedro Alves <palves at redhat dot com>
- To: Michal Lesniewski <m dot lesniewski at samsung dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 18 Oct 2012 11:08:38 +0100
- Subject: Re: Implementation of different software breakpoint kinds in gdb server
- References: <000001cdad12$1e2b1950$5a814bf0$%lesniewski@samsung.com>
On 10/18/2012 10:22 AM, Michal Lesniewski wrote:
>
> I was wondering if anybody was already considering to extend the code in
> mem-break.c to add support for different kinds of breakpoints.
Extending mem-break.c is not the big problem, IMO. The RSP already supports
this, with the mode encoded in the "size" field of the z0 packet.
Offhand, the main issues with tracepoints on ARM are:
#1 - gdbserver needs to know how to step over the tracepoints, without gdb's intervention.
#2 - ARM can't hw single-step, so that needs to be done the hard way, with breakpoints
(a.k.a., software single-step).
All the logic to do that is in gdb. This conflicts with #1.
So we'd need to teach gdbserver to software single-step. Maybe it's possible
to tell offline all the possible destinations of an instruction, so we could still
leave that logic in gdb, but I suspect not.
I don't know whether the current kernel can already do all that for us? (perf,
uprobes, etc?)
--
Pedro Alves