Re: [reverse RFA] no singlestep-over-BP in reverse

Michael Snyder
2008-09-16T18:45:13Z

teawater wrote:
> I think maybe some reverse target (in the future?) need it.
> Someone already know it already deal the breakpoint. But the others
> will not know. Maybe I will change inside record to second type.
>
>
> If this single step affect some target, how about let target choice it
> with itself?

At the moment, my opinion is that gdb needs to be able
to expect consistent behavior from the target(s).

And I believe that consistent behavior / semantics should be:

If you tell me that you are stopped at instruction 1000,
regardless of whether you were going forward or backward
when you got there, then I will expect that if I tell you
to execute forward, you will execute the instruction at
1000.

Therefore the machine state at this point should reflect
the state BEFORE any side effects of the forward execution
of that instruction.

This is how it is for forward execution, and it only makes
sense to expect the same for reverse execution. Any variables
that are changed by the instruction should have their pre-
execution values.