Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Jakob Engblom <jakob@virtutech.com>
Cc: gdb@sourceware.org
Subject: Re: Simics & reverse execution
Date: Wed, 19 Aug 2009 12:29:00 -0000	[thread overview]
Message-ID: <daef60380908190157y60445462hff090f3169a4d703@mail.gmail.com> (raw)
In-Reply-To: <027701ca209f$64c71ce0$2e5556a0$@com>

This is really a big mail.  And looks like a AD.  :)

I think you mean is simics can support reverse with remote like vmware, right?

Hui

On Wed, Aug 19, 2009 at 15:33, Jakob Engblom <jakob@virtutech.com> wrote:
>
> In a thread about testing gdb reverse, Michael Snyder asked this question about
> reverse debug and Simics:
>
> > I think with your setup, you can make the recording first,
> > before you ever start gdb, am I right?
> >
> > I don't know whether you also have an option to start making
> > the recording after you start debugging?  If so, you might want
> > to test it in the same context?
>
> I think it helps to explain how Simics does reverse execution (and which is
> fairly similar if more nimble than the VMWare implementation currently).
>
> Essentially, reverse execution is implemented on the hardware level. Simics
> simulates an entire system: core processors, their surrounding devices on a
> typical system-on-chip, memories, disks, networks, PCI, RapidIO, etc.  In
> extreme cases, we are talking about entire virtual networks and virtual SMP
> servers with 10s, 100s, or 1000s of processors.
>
> The key level that Simics observes is the software interface to the hardware.
> Simics does not need to know anything about the software to run it, it just
> simulates the hardware.
>
> To reverse execution in Simics, you use a combination of record and reexecution
> techniques. Simics itself is 100% repeatable in its execution, and it can record
> any asynchronous user input to a system like network packets and users typing on
> keyboards attached to virtual systems.  To reverse the execution, you jump back
> to a checkpoint fo the system state and then you reexecute forward, to a place
> before your current position in time.  There is a good illustration of this in
> the white paper at
> http://www.virtutech.com/whitepapers/simics_checkpointing.html .
>
> 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?
>
> From the outside, the semantics are identical to process record -- except that
> there is no recording. But you have a limited window in both cases to which you
> can go back (you start reverse execution at some point in time, which could be
> system boot, or some later point).
>
> When we mix in gdb reverse with this, it is just an interface to the Simics core
> engine.  Gdb reverse can be attached at any point during a run. Often, the way
> you do things is to boot a machine to prompt (or open the booted state from a
> checkpoint stored on disk), load target software in some way, and turn on
> reverse execution when things get interesting: such as setting up the
> configuration for the software to run, starting dependent services, connecting
> to network servers, etc.
>
> Once the program you want to debug runs, you open a gdb remote connection and
> attach gdb. Note that Simics by default lets gdb remote control one processor at
> the hardware level, which is useful for bare-hardware or kernel-level debug.  We
> can also use OS awarenesss to have a remote gdb only debug a certain process
> when it is running.   Note that the Simics reverse affects the entire software
> stack, including any writes to memory, disk, network packets sent, and kernel
> process schedulings and interrupts from hardware.  In many ways, this makes
> implementing reverse execution easier: there is a single interface level to
> attack, no need to udnerstand the operating system on the target.
>
> As far as gdb remote is concerned, you can conceptually reverse into a time
> prior to when gdb remote was attached. The underlying "recording" has no
> relation to the actions of gdb remote.
>
> In simics, there are additional controls than regular debugging, such as turning
> off reverse execution during a simulation. And "clearing the recording",
> essentially making the current point in time the start of an unknown future
> where asynchronous input from the user and environment is allowed, and the
> system will take a different path than it took previously.  This does not
> necessarily need to be addressed over gdb-remote.  But it might map to some of
> the process record commands quite naturally.
>
> 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.
>
> But from a gdb perspective, all of this is hidden in a remote black box that
> talks gdb remote.
>
> /jakob
>


  reply	other threads:[~2009-08-19  8:58 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 [this message]
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
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=daef60380908190157y60445462hff090f3169a4d703@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jakob@virtutech.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