Tracepoints on gdb/gdbserver
Ramana Radhakrishnan
ramana.radhakrishnan@codito.com
Wed Oct 1 04:44:00 GMT 2003
On Wed, 2003-10-01 at 04:12, Jim Blandy wrote:
> Daniel Jacobowitz <drow@mvista.com> writes:
> > That'll work. I got the impression that tracepoints are designed to be
> > even lighter-weight than that; you can implement them via an agent
> > expression -> native assembly conversion. But this requires runtime
> > patching and is quite complicated. Just saving the overhead of the
> > remote protocol will be useful.
>
> Yes. The original implementation used a bytecode interpreter (which
> is really pretty fast), but it was an embedded board with no OS, and
> the interpreter ran in the same address space as the program being
> debugged, so those memory references were just load instructions, and
> the trace opcodes were just memcpy calls.
>
> If you implement tracepoints in gdbserver, then those are going to
> become ptrace calls, which are going to be a lot slower. It might
> still be fast enough for your purposes --- but I just want to point
> out that it's not the same arrangement we used in the original
> application.
I agree that it would be slow but as Daniel points out, compared the
overhead of the remote protocol, it would still be useful.
regards
Ramana
More information about the Gdb
mailing list