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: Tue, 08 Sep 2009 19:11:00 -0000	[thread overview]
Message-ID: <4AA6AC52.4080808@undo-software.com> (raw)
In-Reply-To: <01c001ca3084$908f30c0$b1ad9240$@com>

Jakob Engblom wrote:
>>> That's why an abstract bookmark concept is so appealing: it can hide
> anything
>> in
>>> the backend, and let it worry about setting up times on multiple processors,
>>> multiple machines, or hardware recorders.
>> Ok, yes, I see what you're getting at here: bookmarks might be more
>> easily implemented in some targets than some global linear notion of
>> time.
> 
> Not quite... but it lets us get some use out of time in gdb without introducing
> a time concept.  As I said, if we let the backend generate bookmarks, we can get
> to any time precision we want by pushing bookmarks from the backend.  Withtout
> gdb having to understnad time.

Ah, the discussion comes back to where we started :)

Sincere apologies if I'm being stupid here, but I'm still struggling to
understand you.  i.e. I still don't understand why "get-time/set-time"
commands require that gdb gains any notion of time.

You mentioned earlier that a target might want routinely to generate
bookmarks (e.g. every 10ms).  If that target numbered those bookmarks
1,2,3,4,etc then it would have exactly the notion of time that I'm
asking for here.

> 
> Another issue with time is that once gdb knows about time, you have to be much
> more careful when changing place in the program.  If jumping back and forth, you
> have to make sure that gdb time is correctly updated.  Today, having a
> state-less debugger makes this easier: we retrofitted (as I guess you did)
> reverse execution on gdb quite easily since gdb had no notion of time.  Had
> there been that, it would have been much more painful.

I don't follow.  If we had "get-time/set-time" commands, these could be
proxied by gdb straight to the target.  Thus gdb remains stateless in
this regard, and blissfully unaware of any notion of jumping around in
time.  All gdb needs to know is that "set-time" will change the
target's state, but that's no different to regular continue or step.

>  
>>>> Again, you could go a lot further than I'm proposing right now.  But
>>>> that's not to say you need to for this stuff be useful.
>>> Yes, for us, a 64-bit integer count of time would be quite useful as a
> general
>>> tool.
>> Cool - so is the general agreement that a scalar notion of time is a
>> useful thing to add, even if it's not supported in all reversible
>> targets?  (And bookmarks is an (at least) equally useful notion.)
> 
> I think a scalar time is very useful. But I fear that implementing it will meet
> with resistance and require quite drastic changes.  Bookmarks are probably
> easier to introduce as a first step. That was what Michael Snyder said, and I
> can agree with that.

Hopefully Michael can clarify, but I thought he was agreeing that we
don't want to teach gdb about the concept of time (not yet anyway),
which I also totally agree with.

My proposal is that a "timestamp" (i.e. what "get-time" returns) would
be very like a "bookmark", except:

(a) not precise like a bookmark (e.g. if "get-time" returns timestamp X,
then a subsequent "set-time" will take you close to time X, but not
necessarily exactly at time X)

(b) multiple timestamps can be compared to get an approximate idea of
their point in history relative to each other.  e.g. timestamp 20 would
come before 22 and 22 would come before 100, and also 22 is is much
closer to 20 than it is to 100.

> 
> Ideally, I DO want gdb to be time-aware, but that does require a lot of semantic
> thinking for how time can and should interact with multiple threads, processor
> cores, and reverse debug systems.

Note my emphasis on "user" above - I'm not talking about gdb making any
semantic interpretation of the timestamp.  It's just a number that gdb
displays to the user.  Opaque to gdb, but potentially meaningful to the
user.

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


  reply	other threads:[~2009-09-08 19:11 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
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 [this message]
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=4AA6AC52.4080808@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