Re: GDB MI Reverse Commands added [2 of 3]

Michael Snyder
2009-08-28T17:34:53Z

Eli Zaretskii wrote:
>> Date: Fri, 28 Aug 2009 17:59:50 +0100
>> From: Greg Law <glaw@undo-software.com>
>> CC: jakob@virtutech.com, gdb-patches@sourceware.org
>>
>> But I'm struggling to think of a plausible way in which
>> a target could provide reverse debugging without some kind of log.
>
> Don't we have already some kind of that implemented by forking the
> inferior several times, and then switching to the appropriate fork
> when the user wants to go backwards?

You're thinking of checkpoint and restart.
It does allow you to go back to a previous state, but it's
functionally orthogonal to reverse.

> Anyway, a target could conceivably provide reverse execution without
> any need for GDB to do that for it. I don't think the manual should
> be too tied to what we currently have, because then it would be a pain
> to maintain.

I see your point, but OTOH all of the current implementations rely
on a log of some sort, and I agree with Greg that it isn't easy to
imagine one that didn't.

I think we should mention that "running off the end of the log" is
one way in which a reverse continue may terminate, because in fact
that is something that may happen in all of the current implementations.