This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: reverse for GDB/MI
Michael Snyder 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. I consider the
reverse commands as a new set commands and not a variant of the old.
That's correct. The new commands (eg. reverse-next) account for
the differences between the standard commands and what should
happen in reverse.
However, note that (set exec-dir reverse ; next) is equivalent
to "reverse-next". It will do the right thing.
I am not convinced that adding the exec-dir setting was good. What should
the user expect when first changing the direction to reverse and then
doing reverse-step, a normal step? GDB currently prints a warning in
this case, "Already in reverse mode...".
Why is not reverse the normal debugging direction and forward the
non-normal one? I know that debugging forward should/must be default,
I just want to open everyones mind about reverse debugging.
What is the normal debugging case? something has gone wrong and you
want to see what happened or you know that something will go wrong
and you want to see what happens.
/tomas