reverse for GDB/MI
Tomas Holmberg
th@virtutech.com
Fri Dec 19 08:26:00 GMT 2008
Vladimir Prus wrote:
> Tomas Holmberg wrote:
>
>>> I am not quite sure about adding new set of commands for that. Can we use
>>> --reverse option, thereby not introducing new commands?
>> Adding a reverse option to the existing commands is possible. But I do
>> not think it is a good idea. It is not always obvious what should
>> happen when running a standard command in reverse.
>
> Why? -exec-step always steps forward. -exec-step --reverse always steps
> backward. Seems like a fairly simple model to me.
There are other reverse commands than the -exec-reverse-step that are more
complicated. If you consider all reverse commands to be simple variants
of the forward commands, then you are correct that there should just
be a --reverse option. But I consider them to not be simple variants.
You can also look at the documentation to see if the reverse commands are
just variants of the forward variants. I do not think we can replace the
documentation for reverse-step, reverse-step-instruction, reverse-continue,
reverse-finish, reverse-next, and reverse-next-instruction and just say it
is the reverse variant for the corresponding forward commands. Please look
at the other reverse commands and see if you can say "reverse-finish" is
just the reverse variant of finish.
/tomas
More information about the Gdb-patches
mailing list