This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tracepoints on gdb/gdbserver


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]