using tracepoints function with both host and target on same computer

Daniel Jacobowitz drow@mvista.com
Wed Aug 7 08:01:00 GMT 2002


On Wed, Aug 07, 2002 at 09:51:53AM -0500, William A. Gatliff wrote:
> Eli:
> 
> 
> > IMHO, tracepoints should really become part of GDB itself, even for 
> > native debugging.  That would allow us to debug programs where timing is 
> > critical, such as real-time software, Emacs display engine, etc.  I miss 
> > that feature a lot.
> 
> Wouldn't some kind of stub be present in these situations anyway?  So
> it'd still be an implementation concern for the stub...
> 
> In fact, I don't see how you could do tracepoints effectively in
> anything resembling real time without stub assistance.

You don't do them in actual realtime, but neither do you wait for all
of GDB to process the event; you receive the breakpoint, collect
tracepoint data, and immediately resume without touching GDB's event
loop.  It's a little slower than an in-application stub because it has
to use ptrace to read memory/registers, but not substantially slower.

If you need better, you have to link a stub into the application.  I
think we've been investigating a library for that, but I don't know
when/if it'll be available.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb mailing list