Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Greg Law <glaw@undo-software.com>
To: Jakob Engblom <jakob@virtutech.com>
Cc: 'Michael Snyder' <msnyder@vmware.com>,
	gdb@sourceware.org,   'Julian Smith' <jsmith@undo-software.com>
Subject: Re: Simics & reverse execution
Date: Mon, 07 Sep 2009 08:13:00 -0000	[thread overview]
Message-ID: <4AA4C0A4.7000509@undo-software.com> (raw)
In-Reply-To: <005201ca2f8b$23c4cc60$6b4e6520$@com>

On 09/07/2009 08:16 AM, Jakob Engblom wrote:
>
>>    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...

Intriguing.  In what ways?

We currently have a somewhat baroque bunch of python that wraps up gdb 
to enable our reverse debugging commands on users system where they've 
an older version of gdb installed.  This includes some commands to 
display the current time and jump to an arbitrary time (where time is a 
scalar 64-bit integer).  The rest of gdb remains blissfully unaware 
(obviously, since it's unpatched).

I can see how in general "teaching" the concept of time to gdb would be 
a huge job.  But I don't think a command to jump around arbitrarily and 
another to display the "current" time needs to teach anything about time 
to the rest of gdb.


>
> 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.

All of the above sounds good to me.

However, I still reckon a pair or commands simply to get and set the 
time as a scalar value should be both useful for the user, and  trivial 
to implement (he said, confidently :-)  It could be orthogonal to 
bookmarks (a way to convert bookmarks to scalar time value would be 
useful, but not essential to start with).

We should probably pipe up with some patches, but I'm just slightly 
nervous that I may have missed something, especially as I'm not really 
terribly au fait with gdb's internals and its assumptions (hence the 
discussion first).


Cheers,

Greg

-- 
Greg Law, Undo Software                       http://undo-software.com/


  reply	other threads:[~2009-09-07  8:13 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17  7:42 gdb reverse execution: how to actually run tests for it? Jakob Engblom
2009-08-17  7:58 ` Hui Zhu
2009-08-17 11:33   ` Jakob Engblom
2009-08-17 11:50   ` Jakob Engblom
2009-08-17 11:55     ` Pedro Alves
2009-08-17 15:31       ` Pedro Alves
2009-08-17 15:52         ` Hui Zhu
2009-08-20 17:10           ` Pedro Alves
2009-08-19  7:34         ` Jakob Engblom
2009-08-17 18:24       ` Michael Snyder
2009-08-17 20:08         ` Jakob Engblom
2009-08-17 22:44           ` Michael Snyder
2009-08-19  7:24             ` Jakob Engblom
2009-08-19  8:58             ` Simics & reverse execution Jakob Engblom
2009-08-19 12:29               ` Hui Zhu
2009-08-19 20:03                 ` Jakob Engblom
2009-08-19 20:29                   ` Michael Snyder
2009-08-19 20:44                     ` Daniel Jacobowitz
2009-08-19 21:09                     ` Pedro Alves
2009-08-20  6:54                       ` Jakob Engblom
2009-08-20 15:03                         ` Pedro Alves
2009-08-27  4:44               ` Michael Snyder
2009-08-27  8:17                 ` Jakob Engblom
2009-08-28 11:04                   ` Michael Snyder
2009-08-28 15:17                 ` Greg Law
2009-08-31 13:22                   ` Jakob Engblom
2009-08-31 16:34                     ` Greg Law
2009-09-01  6:37                       ` Jakob Engblom
2009-09-01 13:49                         ` Greg Law
2009-09-03 19:16                           ` Jakob Engblom
2009-09-04 12:44                             ` Greg Law
2009-09-07  7:16                               ` Jakob Engblom
2009-09-07  8:13                                 ` Greg Law [this message]
2009-09-07  8:24                                   ` Jakob Engblom
2009-09-07 12:06                                     ` Greg Law
2009-09-08  7:21                                       ` Jakob Engblom
2009-09-08 12:08                                         ` Greg Law
2009-09-08 13:02                                           ` Jakob Engblom
2009-09-08 19:11                                             ` Greg Law
2009-09-14  8:26                                               ` Jakob Engblom
2009-09-17  3:07                                                 ` Michael Snyder
2009-08-19  7:24       ` gdb reverse execution: how to actually run tests for it? Jakob Engblom
2009-08-19 15:28         ` Pedro Alves
2009-08-19 16:37           ` Tom Tromey
2009-08-20 13:10             ` Jakob Engblom
2009-08-20 14:50               ` Daniel Jacobowitz
2009-08-20 20:27               ` Michael Snyder
2009-08-20  6:53           ` Hui Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AA4C0A4.7000509@undo-software.com \
    --to=glaw@undo-software.com \
    --cc=gdb@sourceware.org \
    --cc=jakob@virtutech.com \
    --cc=jsmith@undo-software.com \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox