Re: [discuss] Support for reverse-execution

Daniel Jacobowitz
2005-05-21T01:56:48Z

On Fri, May 20, 2005 at 09:52:45PM -0400, Daniel Jacobowitz wrote:
> Frank has contributed that sid would more readily support the sort of
> snapshot-based reconstruction that you're talking about (thanks Frank).
> I think that allowing the target to provide infrun with a view in which
> "single step backwards" is possible and then implementing that under
> the covers in the target stack would still be the way to go - but I
> don't think that's a legitimate objection to supporting a smart
> simulator which does it internally.

BTW, a thought to consider - again, one which will only be interesting
when there's a system to which it applies.

What most of these single-stepping commands want to do, in the absence
of watchpoints, is see the PC sequence over a timeline, choose a
stopping state, and go to that state. For some simulator it may be
substantially more efficient to just ask the target for a history of PC
values for some number of cycles, all at once, and then tell it which
one of those we're interested in. That would work for reverse-next,
for example.

I don't know the level of computation involved in these snapshots in
Simics; perhaps an intelligent simulator, when told to go backwards,
would reconstruct a series of "frames" all at once and cache them, so
this is a non-issue. For some other simulator not yet available,
perhaps it's not.

--
Daniel Jacobowitz
CodeSourcery, LLC