This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [discuss] Support for reverse-execution


> From: "Michael Snyder" <msnyder@redhat.com>
> Date: Thu, 12 May 2005 16:08:34 -0700
> 
> I'd like to start adding some commands to gdb to support targets
> that can perform reverse execution (eg. stepping backwards).
> This concept has been around for a number of years now, and I
> have access to a target (the Simics simulator from Virtutech)
> that does it quite handily.

Sounds like a great idea.

> 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.

> 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.
> 
> 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.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]