This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [discuss] Support for reverse-execution
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Fri, 20 May 2005 18:45:22 +0400
- Subject: Re: [discuss] Support for reverse-execution
- References: <00c601c55747$860a3e80$aaa56b80@msnyder8600>
Michael Snyder wrote:
> 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.
>
> 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.
Would not it be better to have a single "reverse" command which puts the
debugger in "reverse" mode -- making step/stepi/next/nexti go backward.
This might be handier for UI -- after all "step" can be abbreviated as 's',
but reverse-step can't be abbreviated. This might be better in GUI too --
instead of doubling the number of "step" commands you'd have a single
"gear" switch, that can be in either "forward" or "reverse" position.
- Volodya