Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@codesourcery.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb@sources.redhat.com, Eli Zaretskii <eliz@is.elta.co.il>
Subject: Re: [discuss] Support for reverse-execution
Date: Fri, 20 May 2005 21:27:00 -0000	[thread overview]
Message-ID: <20050520212726.GN4861@nevyn.them.org> (raw)
In-Reply-To: <428E527D.70402@redhat.com>

[Michael, if you get a chance, please update your address book; I'm not
@mvista.com any more.]

On Fri, May 20, 2005 at 02:11:25PM -0700, Michael Snyder wrote:
> I agree with this interpretation.  If I am a user (and I am),
> and I were to say:
>     (gdb) step
>     (gdb) reverse-step (or whatever)
> I would expect to be back where I started, ie. at the
> *beginning* of the original line.
> 
> Dan J. has said that we might need to reverse-stepi until
> we've gone back one too many, and then do a forward step.
> I agree.  In fact, I think it will be necessary to do
> the following:

After reading this a couple of times, I'm pretty sure you're right. 
Consider:

line:	foo
line2:	inc $r1
	cmp $r1, 64
	bne line
line3:  bar		# $pc points here

Reverse stepi from the inc may go to the bne, but we want to stop when
reverse stepi from the inc would go to the foo instead.

We don't have a lot of opportunity to make sure we're really where we
want to be when we're going forwards.  When we're going backwards,
though, we do.  Let's use it!

>     (gdb) reverse-step
>     # reverse-stepi once (or until we leave the *current* line)

BTW, this bit is a little more complicated, because we might go to
another frame.  So we might have to do some reverse-finish's stacked in
there.  I think infrun will need some serious cleaning up to pull this
off.

>     # now establish the step-range start and end (prev line)
>     # reverse-stepi until we leave the prev line
>     # stepi once to get back to the desired line.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-05-20 21:27 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 21:11 Michael Snyder
2005-05-20 21:27 ` Daniel Jacobowitz [this message]
  -- 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 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-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
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
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=20050520212726.GN4861@nevyn.them.org \
    --to=dan@codesourcery.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    --cc=msnyder@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