This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Using reverse execution
On Wed, Sep 21, 2005 at 06:39:42AM +0300, Eli Zaretskii wrote:
> > Cc: gdb@sources.redhat.com, shebs@apple.com
> > From: Ian Lance Taylor <ian@airs.com>
> > Date: 20 Sep 2005 16:13:55 -0700
> >
> > There is probably some cool use for which tracepoints are the
> > obvious right answer, but I don't know what it is.
>
> In native debugging, tracepoints would be very useful to debug a
> real-time program, or, more generally, a program where timing issues
> are crucial to its correct operation. With such programs, normal GDB
> usage disrupts the program operation and might even cause the program
> to fail in ways that are unrelated to the bug you are looking for.
Yes - and I've definitely tried to debug programs using GDB where this
would have been helpful. E.G. when working on the MIPS port of NPTL.
I ended up doing the manual equivalent using printf, but printf can
actually be much higher overhead than in-memory tracepointing, and
recompiling libc every time I needed to change the debugging output got
to be a bit of a drag.
--
Daniel Jacobowitz
CodeSourcery, LLC