This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Tracepoints and Timestamps
On Monday 07 November 2011 16:15:17, Stan Shebs wrote:
> On 11/7/11 6:53 AM, Abhishek Karoliya wrote:
> > Hi Hui,
> >
> > Thanks for the pointer ... However after going through the
> > gdbserver source code, I realise that there is no tracepoint support
> > for linux-ppc. So now I have a even bigger problem on my hand.
> >
> > Does anyone know if I can ppc tracepoint support being actively
> > developed and if I can lay my hands on this experimental code.
> >
>
> The tracepoint support in GDBserver is pretty generic, and if you don't
> need fast tracepoints, there's not really anything that is arch-specific.
>
> I would suggest enabling target_supports_tracepoints for ppc and letting
> us know how it goes. If it "just works", then we could change the
> target_supports_tracepoints test to make it unconditional.
We can't. The backend needs to be able to step over breakpoints
so it can step over tracepoints without gdb involvement. Which means, it
either needs to support hardware single-step (ppc does), or, it'll need to
know how to software single-step. No gdbserver port can do the latter.
And it should ideally switch to using gdbserver side breakpoints (z0/Z0
packets, the insert_point/remove_point hooks), so breakpoints and
tracepoints can coexist.
linux-ppc-low.c should install the supports_tracepoints hook like
linux-x86-low.c does:
static int
x86_supports_tracepoints (void)
{
return 1;
}
and insert_point/remote_point hooks, like x86_insert_point/x86_remove_point.
The Z0 insert/remove code support would ideally be moved to the gdbserver
core side, controlled by a new "use software breakpoints" hook added to
gdbserver's target vector, so that bit of code could be reused.
--
Pedro Alves