This is the mail archive of the gdb@sourceware.org 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: Reverse debugging


Nick Roberts wrote:
On i386, with current GDB, if I do:

(gdb) reverse-next

I get:

Target child does not support this command.

However if I do:

(gdb) target record

first, and proceed, then "reverse-next" does indeed work as I would expect.

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).

Is it possible to reverse debug without doing "target record" first?

Yes -- but not under target exec (normal native debugging).


If not
then I think "Reverse Execution" should be a sub-node of "Process Record and
Replay".  In any case it would be helpful to mention "target record" in the
"Reverse Execution" node if most platforms don't support reverse execution
outside record and replay.

No, reverse execution is not tied to process record -- it just isn't available under target exec.

Is there a GDB command that shows if process recording is started/stopped?
"target record" doesn't appear to influence the output of 'info target".

Good question. We've been discussing the same question under the thread "Testing of reverse debug commands", and I think we're leaning toward the conclusion "we need such a command".



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