This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [reverse RFA] no singlestep-over-BP in reverse
Daniel Jacobowitz wrote:
On Tue, Sep 16, 2008 at 11:03:42PM +0800, teawater wrote:
1. The instruction in this address already reverse executed, it make
program status back to before forward execute this instruction.
I like this approach; I believe it's what we used in the qemu reverse
implementation also. It means that you have the same state when
you're pointing at the start of a source line: it has not yet executed.
Yes, this is also the behavior of the Simics (Virtutech)
reverse engine, and VMware's implementation, and gdb-freeplay.
I think it's the only correct choice, frankly.
Suppose my source statement is:
x = -1;
and suppose my architecture implements that in a single instruction.
If x == -1 after the statement, but x == 0 before the statement,
then reverse-executing the statement has no meaning unles it
changes the value of x back to its pre-execution value.