Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Snyder <msnyder@redhat.com>, gdb@sources.redhat.com
Subject: Re: [discuss] Support for reverse-execution
Date: Thu, 19 May 2005 13:46:00 -0000	[thread overview]
Message-ID: <20050519134150.GB15632@nevyn.them.org> (raw)
In-Reply-To: <01c55783$Blat.v2.4$d6ab25c0@zahav.net.il>

On Fri, May 13, 2005 at 09:19:17AM +0300, Eli Zaretskii wrote:
> > I propose we add something like the following commands
> > (names open to discussion):
> > 
> > reverse-continue -- start executing backwards until something
> > interesting happens (most likely hitting a breakpoint).
> > 
> > reverse-stepi -- "un-execute" the previous instruction.
> > 
> > reverse-step -- "un-execute" the previous source line.
> > 
> > reverse-finish or "un-call" -- proceed backward until 
> > the current function is about to be called by its caller.
> > 
> > reverse-until... etc.
> 
> Not "reverse", "backwards" or "back".  "Reverse" will become ambiguous
> once we have two possible directions.

Actually I think "reverse" is a more logical term.  Drivers don't
seem to get confused when they put a car into reverse, which is a
natural parallel.  The program doesn't have a persistant direction.
If it's stopped, "continue" will always move forwards in time
and "reverse-continue" will always move backwards.

"back-step" is kind of appealing, but "back-continue" and "back-next"
just don't sound right.  I suppose we could use "continue-backwards"?

I would just have called the command rcontinue, but reverse-continue is
fine with me too; either way we'll hopefully offer abbreviations, like
"c" and "si".

> > Along with these commands, we would need at least two new
> > remote-protocol messages: "rc" for reverse-continue, and "rs" 
> > for reverse-stepi.  I think all of the above user commands could
> > be implemented on these primatives.  Obviously if the remote
> > target doesn't understand these primatives, the user command 
> > would error.

You used rc, Johan used bc.  It should be consistent with the command
names.  I wish one of you had noticed vCont though, at least as an
example :-)

`vCont'[;ACTION[`:'TID]]... -- extended resume
     Resume the inferior.  Different actions may be specified for each
     thread.  If an action is specified with no TID, then it is applied
     to any threads that don't have a specific action specified; if no
     default action is specified then other threads should remain
     stopped.  Specifying multiple default actions is an error;
     specifying no actions is also an error.  Thread IDs are specified
     in hexadecimal.  Currently supported actions are:

Hmm, thinking about this some more, maybe not such a bright idea. The
documentation would need some clarification, since even if we someday
have a simulator which both supports reverse execution and presents a
view of multiple threads (the implications are dizzying) I'm sure it
will be strictly limited in how you can back up the program.  Backing
up one thread while running another forwards, or even while leaving
another stopped, doesn't make sense - it creates a view of execution
which never occurred in the previous run.  However, there are still two
advantages to vCont: consistency, and a pre-existing query packet,
vCont?.

I'm not dead set on this idea; the benefits of consistency are pretty
small in this case and the thread-specific expressive power of vCont is
not obviously useful for reverse execution.  However I think a query
packet is still wise.  This allows a front end to modify its interface
based on whether the target supports reverse execution without having
to try it.

> > Finally, we'd need a new entry for the target vector --
> > something like "to_resume_backwards".  If the target vector
> > doesn't export this method, the user command would error.

Whichever name we settle on let's be consistent - if we use "reverse"
for the commands and documentation, we should use if for the target
hook too.

> Please don't forget the manual changes for these features.

Definitely!

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-05-19 13:46 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 23:08 Michael Snyder
2005-05-13  6:23 ` Eli Zaretskii
2005-05-19 13:46   ` Daniel Jacobowitz [this message]
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
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-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-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-20 19:02 Michael Snyder
2005-05-20 20:43 ` Eli Zaretskii
2005-05-20 21:03   ` Michael Snyder
2005-05-20 21:11 Michael Snyder
2005-05-20 21:27 ` Daniel Jacobowitz
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:25 Michael Snyder
2005-05-20 21:44 Michael Snyder
2005-05-20 21:51 Michael Snyder
2005-05-21  9:44 ` Eli Zaretskii
2005-05-20 21:59 Michael Snyder
2005-05-20 22:11 Michael Snyder
2005-05-20 23:32 ` Paul Schlie
2005-05-21 15:53 Paul Schlie

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=20050519134150.GB15632@nevyn.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --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