This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Simics & reverse execution
- From: "Jakob Engblom" <jakob at virtutech dot com>
- To: "'Greg Law'" <glaw at undo-software dot com>
- Cc: "'Michael Snyder'" <msnyder at vmware dot com>, <gdb at sourceware dot org>, "'Julian Smith'" <jsmith at undo-software dot com>
- Date: Mon, 7 Sep 2009 09:16:37 +0200
- Subject: RE: Simics & reverse execution
- References: <002001ca1f0e$4c9b74a0$e5d25de0$@com> <daef60380908170058i455ee534l527e58238a0839b9@mail.gmail.com> <002101ca1f2e$746e1ad0$5d4a5070$@com> <200908171251.07179.pedro@codesourcery.com> <4A899E2E.6080203@vmware.com> <00b801ca1f74$e5610a90$b0231fb0$@com> <4A89B7E4.9010804@vmware.com> <027701ca209f$64c71ce0$2e5556a0$@com> <4A95E319.6020300@vmware.com> <4A97B9C9.8070501@greglaw.net> <010b01ca2a3c$7766ca70$66345f50$@com> <4A9BF84F.3070404@undo-software.com> <025201ca2ace$a9256430$fb702c90$@com> <4A9D2650.6080209@undo-software.com> <019501ca2ccb$0bc1bd70$23453850$@com> <4AA10B93.4000905@undo-software.com>
> Example - say the user wants to go back to the beginning of time, but
> didn't think to take a bookmark when they were there. Executing
> backwards might take a long time. For systems like Simics, UndoDB and
> VMware that use a snapshot-and-replay technique it can be almost instant
> to jump back to time 0. We could always add a special command to goto
> time 0 or a special bookmark, but why not generalise it? e.g. maybe the
> user wants to skip forwards a few seconds' worth, but again, doesn't
> have a bookmark conveniently placed.
>
> It seems that for at least some targets this would be pretty
> straightforward to implement and a very useful feature for users.
I agree with this, and I think that a notion of scalar time in some undefined
unit would make the UI on the gdb side much easier. Problem is that gdb
currently lacks a time concept... and my understanding is that introducing it is
going to be painful. Time really becomes very pervasive once you start using it
in one place...
So, currently, a bookmarks mechanism seems to make the most sense. I think that
most of the issues we have can be solved at the user-level:
* Always take a bookmark when you start (which normally for is not time zero,
but rather some arbitrary point in time of the target system when the reverse is
turned on).
* Allows the backend to push bookmarks. In that way, you just set up a script or
module that sends bookmarks to gdb at a regular pace in target time (say every 1
microsecond on the target side or whatever).
* Your frontend scripts can then rely on these bookmarks.
Not super-solid, but it works with a simple bookmark mechanism and keeps time
internal to the backend.
/jakob