Re: Simics & reverse execution

Michael Snyder
2009-08-27T01:35:45Z

Jakob Engblom wrote:

> Doing reverse breakpoints basically involves successively jumping back and
> executing forward until breakpoints trigger. I think process record does
> something very similar, based on the recording, right?

No, that's one major difference with process-record.
It doesn't use any state snapshots or checkpoints, its data contains
only change sets for single instructions. So it executes backward
one instruction at a time, in reverse sequence.

Of course, to the user, and to the core of gdb, the difference
is invisible, except possibly for speed.

[...]
> What this means for Simics and gdb remote is that it would be nice to be able to
> deal with points in time: in Simics, you are moving the target system clock
> around in time arbitrarily. In the Simics reverse interface, you can go to a
> certain point in time, and also set execution bookmarks.

Those are both very cool ideas, and I would like to add them,
both to the remote protocol and to process remote.

I think we just need to come up with a sufficiently arbitrary
way to represent both a "point in time" and a "bookmark", so
that they can be passed back and forth between gdb and the
remote target without gdb needing to know what they actually
represent (eg. a timestamp or a branch count). Only the target
needs to know how to interpret them.

Maybe an 8 byte integer would be sufficient? What do you think?

So I'm thinking something like:
1) user to gdb: "I want to place a bookmark here (now)".
2) gdb to target: "Give me a marker that I can later use to mean "here
(now)".
3) target to gdb: "Ok, here, use this instruction count."
4) (later): user to gdb: "I want to return to this bookmark".
5) gdb to target: "Please return to this marker that you gave me earlier".