[RFA] Reverse Debugging, 1/5

Michael Snyder msnyder@vmware.com
Wed Oct 8 01:46:00 GMT 2008


Joel Brobecker wrote:
>> Just, well, then target_set_execdir does not actually
>> set the exec direction -- instead it sort of tells you
>> if it's *ok* to set the exec direction -- which is what
>> I would think of as target_can_reverse.
> 
> I think that the overloading of the word target is making it very
> hard to understand each other.

Well, *something* is, that's for sure.
Might just be early senility on my part...   ;-)

> Again, target_set_exec_dir would tell the inferior that, from now on,
> the exec direction for all future resumes will be (forward|reverse).

But... Oh, I get it.  You're right.  It is the overloading of "target".

Joel, the inferior (in the sense of eg. gdbserver) doesn't have any
memory of the exec direction.  It's stateless.  Each message (eg.
'c' or 'bc') is unaffected by the previous one.

So if we remove the memory of the exec state from the target_ops
layer and transfer it to the infrun layer, then target_set_execdir
will have no semantics at all except "does this work".

> If the target method is unset, then we know the feature is unsupported.
> If it is set, and it fails, then refuse the change of direction -
> feature not supported either.  Otherwise, update the infrun direction
> with the new direction.
> 
> --
> Joel



More information about the Gdb-patches mailing list