Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Russell Shaw <rjshaw@netspace.net.au>
Cc: gdb@sources.redhat.com
Subject: Re: [discuss] Support for reverse-execution
Date: Sat, 21 May 2005 10:28:00 -0000	[thread overview]
Message-ID: <428F0DB8.40804@netspace.net.au> (raw)
In-Reply-To: <01c55ded$Blat.v2.4$11e9e260@zahav.net.il>

Eli Zaretskii wrote:
>>Cc: Dan Shearer <dan@shearer.org>, gdb@sources.redhat.com
>>From: fche@redhat.com (Frank Ch. Eigler)
>>Date: 20 May 2005 20:05:13 -0400
>>
>>The point of the other simulation gentleman on this thread is that by
>>using state snapshots as the basic target-side primitive, one can
>>implement backward stepping on the gdb side in a way that will work
>>even with non-brilliant targets.  (By the way, this does not require
>>actual bulk transmission of the state snapshots to gdb, just some sort
>>of management protocol.)
> 
> 
> This leads me to another idea.  Perhaps we should implement a
> checkpointing infrastructure in GDB, and allow the user (perhaps not
> by default, but as part of some mode) to go back to every place where
> the program stopped, for whatever reason: breakpoint, watchpoint,
> single-stepping, etc.  That is, each time the inferior stops, ask the
> target for the information that fully describes its state, store that
> state description, and allow the user to rewind the target to any of
> the stored states.
> 
> I think this would be a great feature to have in all kinds of targets,
> including native, since the user can then step forward from the
> checkpoint to reach any point in between.
> 
> Think how many times you've did a "next" over a function call, just to
> find out that the bug is inside the function which you just
> overstepped, or did a "continue" just to find out at the next
> breakpoint that the problem you are tracing happened in between this
> and the previous stop location.  An ability to rewind back to the
> previous stop is something to kill for in such situations.
> 
> (Btw, I vaguely remember that Turbo Debugger of yore had something
> like that.  Hmmm... I should try to dig out my old copy of that and
> see if I'm right.)
> 
> If we implement something like that, perhaps we could ditch all the
> reverse-* commands whose names we are discussing at such length in
> this thread, and instead implement only one command, called, say,
> "rewind" or "backup" or some such.  That, and a set/show mode command
> to enable checkpointing would be enough, I think, to have 99% of the
> functionality originally suggested in this thread.
> 
> How would this suggestion of mine map to the remote targets and
> simulators that support checkpointing on the target side?

It'd be better to store the state of every step in to a circular buffer
of size 1000 (the user could change that size with a command). Then you
could just: "back 10"  to go to the point that would have been 10 steps
ago, or "back 3 myfunc" to go back to the third last call of myfunc().
That way, there's only one backwards command to remember, and maybe a
command to change the history buffer size.


  reply	other threads:[~2005-05-21 10:28 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16 17:47 Dan Shearer
2005-05-16 18:04 ` Dan Shearer
2005-05-20 18:15 ` Daniel Jacobowitz
2005-05-21  0:05   ` Frank Ch. Eigler
2005-05-21 10:13     ` Eli Zaretskii
2005-05-21 10:28       ` Russell Shaw [this message]
2005-05-21 12:38         ` Eli Zaretskii
2005-05-21 12:55           ` Russell Shaw
2005-05-21 14:39           ` Russell Shaw
2005-05-21 14:19       ` Daniel Jacobowitz
2005-05-21 15:46         ` Eli Zaretskii
2005-05-21 17:43           ` Daniel Jacobowitz
2005-05-23 19:39             ` Dan Shearer
  -- strict thread matches above, loose matches on Subject: below --
2005-05-21 15:53 Paul Schlie
2005-05-20 22:11 Michael Snyder
2005-05-20 23:32 ` Paul Schlie
2005-05-20 21:59 Michael Snyder
2005-05-20 21:51 Michael Snyder
2005-05-21  9:44 ` Eli Zaretskii
2005-05-20 21:44 Michael Snyder
2005-05-20 21:25 Michael Snyder
2005-05-20 21:16 Michael Snyder
2005-05-20 21:31 ` Daniel Jacobowitz
2005-05-21  9:39 ` Eli Zaretskii
2005-05-23 18:19   ` Michael Snyder
2005-05-20 21:11 Michael Snyder
2005-05-20 21:27 ` Daniel Jacobowitz
2005-05-20 19:02 Michael Snyder
2005-05-20 20:43 ` Eli Zaretskii
2005-05-20 21:03   ` Michael Snyder
2005-05-20 15:49 Paul Schlie
2005-05-20 17:41 ` Dan Shearer
2005-05-20 22:01   ` Paul Schlie
2005-05-20 22:08     ` Daniel Jacobowitz
2005-05-20 22:43       ` Paul Schlie
2005-05-21  0:58         ` Daniel Jacobowitz
2005-05-21  1:42           ` Paul Schlie
2005-05-21  1:53             ` Daniel Jacobowitz
2005-05-21  1:56               ` Daniel Jacobowitz
2005-05-21 15:03                 ` Paul Schlie
2005-05-21 14:13               ` Paul Schlie
2005-05-21 14:23                 ` Daniel Jacobowitz
2005-05-21 15:04                   ` Paul Schlie
2005-05-20 20:58 ` Michael Snyder
2005-05-20 21:35   ` Paul Schlie
2005-05-19  1:23 Dan Shearer
2005-05-19 13:01 ` Johan Rydberg
2005-05-19 13:18   ` Daniel Jacobowitz
2005-05-19 13:47     ` Johan Rydberg
2005-05-20 10:37   ` Eli Zaretskii
2005-05-20 11:37     ` Andreas Schwab
2005-05-20 13:18       ` Daniel Jacobowitz
2005-05-20 13:36         ` Fabian Cenedese
2005-05-20 13:47           ` Daniel Jacobowitz
2005-05-20 14:41       ` Eli Zaretskii
2005-05-20 22:14         ` Daniel Jacobowitz
2005-05-20 12:22     ` Johan Rydberg
2005-05-20 13:19       ` Daniel Jacobowitz
2005-05-20 14:12       ` Eli Zaretskii
2005-05-20 13:14     ` Daniel Jacobowitz
2005-05-20 14:34       ` Eli Zaretskii
2005-05-20 15:40       ` Johan Rydberg
2005-05-20 10:47 ` Eli Zaretskii
2005-05-12 23:08 Michael Snyder
2005-05-13  6:23 ` Eli Zaretskii
2005-05-19 13:46   ` Daniel Jacobowitz
2005-05-19 18:46     ` Michael Snyder
2005-05-19 19:26       ` Johan Rydberg
2005-05-20 10:55     ` Eli Zaretskii
2005-05-20 13:04       ` Daniel Jacobowitz
2005-05-20 14:30         ` Eli Zaretskii
2005-05-20 14:43           ` Andreas Schwab
2005-05-20 20:48         ` Michael Snyder
2005-05-20 20:51           ` Daniel Jacobowitz
2005-05-20 20:38     ` Michael Snyder
2005-05-20 15:05 ` Vladimir Prus
2005-05-20 15:58   ` Eli Zaretskii
2005-05-20 18:14     ` Daniel Jacobowitz
2005-05-20 18:30       ` Eli Zaretskii
2005-05-20 19:27   ` Stan Shebs

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=428F0DB8.40804@netspace.net.au \
    --to=rjshaw@netspace.net.au \
    --cc=gdb@sources.redhat.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