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]

[discuss] Support for reverse-execution


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.

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.

At least one target (the Simics simulator) would support these
commands immediately, and once they exist, their presence may
encourage other targets to implement reverse execution.  We know
that the technology exists, it just needs a user interface to be useful.

Comments?

Michael Snyder
Red Hat


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