This is the mail archive of the 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: [RFC] reverse-step, reverse-next

Stan Shebs wrote:
Michael Snyder wrote:

This isn't for submission, just for discussion.  This is something
that Johan Rydberg (of Virtutech) and I have been working on.

I'd like to hear what everybody thinks about this
bit of infrun implementation for the reverse debugging
that we discussed a few months ago.

Seems plausible to me. I've actually been experimenting with
a reverse execution prototype based on GDB managing all the
checkpoints, rather than pushing them down into the target as
Simics apparently does, and while GDB-managed checkpoints are
more powerful in some ways (random access to arbitrary states,
general undo), it's also looking rather more complicated.

Yeah, I consider this sort of abstract and modular. My patch here makes no assumptions about how a backend does reverse execution. The backend could, for instance, call into a separate module such as yours that manages checkpoints. Another backend might do it by direct request to the target -- a la Simics.

This part is enough to get step and next to work in reverse,
based solely on the assumption that the backend (or someone)
provides an interface "get_exec_direction ()", which returns
forward or reverse.  It's also assumed that the backend will
know which direction to go (leaving user-interface issues
out of the picture).  One can imagine either a "set direction"
interface, or a "reverse-step/reverse-continue".

Presumably there is a set_exec_direction,

Presumably. ;-)

and both it and
get_exec_direction are target vector entries?

For instance. But again, this infrun code makes no assumptions. So that decision is orthogonal -- an implementation detail.

This code would be equally useful whether
(a) the direction was set by a modal "set direction" command,
(b) the direction was set by a "reverse-step" command.

BTW, I have a little discussion of usage models for reverse
execution that I'm planning to post on Monday.

Looking forward to it.

I, in turn, have a patch to implement "reverse-finish",
which I thought I'd post a little while after this one.

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