This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [discuss] Support for reverse-execution
>Of course it's possible that you enter the previous line in the middle:
>
>=
> line 1
>label: line 1 some more
> line 1 a bit more
>=
>PC: line 2
> line 2
>
>I think the way to do this is to take advantage of the fact that
>reversible targets are generally (always? too early to tell perhaps)
>going to be repeatable. We can single-step backwards once, enter line
>1, single step backwards again, still in line 1, single-step backwards
>again, we've gone too far, single-step forwards. Or, we could use a
>temporary bookmark. Single-step backwards once, enter line 1, place
>bookmark, single-step backwards again, good, update bookmark. Again,
>oops we're somewhere else, jump to bookmark and report a stop at label.
I followed this thread more out of curiosity than really need for this feature.
That doesn't mean that we still couldn't use it one day :)
I wondered though if this stepping backwards was more than just a simple
setting of the program counter. If I step back over a i++, will it also get
decremented? Or flags, they can't possibly be restored to what they
were before e.g. a comparison, not without keeping a history. So these
r-commands are merely other variants of "set next instruction", possibly
with creating/releasing stack frames but without adjusting values according
to the stepped over commands. Is this correct?
Thanks
bye Fabi