Re: Reverse debugging

Michael Snyder
2009-07-14T17:36:07Z

Nick Roberts wrote:
> > That's because target exec does not support reverse,
> > but target record does. Reverse is also potentially
> > supported under target remote, depending on what remote
> > target you're connected to.
> >
> > > In the "Reverse Execution" node of the GDB manual it talks about
> > > "a target environment that supports reverse execution" but doesn't clarify
> > > what those targets are. The node "Process Record and Replay" comes next
> > > in the manual but these two seem to be inimately related.
> >
> > Process record (target record) is one of a small number of
> > targets that currently support reverse debugging. The others,
> > so far, are all remote targets (eg. SID from Red Hat, and
> > Simics from Virtutech).
> >...
>
> Thanks for these answers, I find them more lucid than the manual. If I try
> to reverse a remote target using gdbserver (actually on host/local machine -
> x86_64 this time), I'm not told that the target doesn't support this command
> but reverse-next works just like next until I hit a function:
>
> (gdb) reverse-next
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x0000000000400521 in printf@plt ()
> Current language: auto; currently asm
> (gdb)
>

Sounds like you are using "record" on top of "target remote"?

I wasn't sure if that would work or not, but sounds like it does.

The failure you are seeing is one that I have an outstanding
change ready to fix.