This is the mail archive of the gdb-patches@sourceware.org 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: reverse for GDB/MI


On Friday 19 December 2008 11:06:36, Joel Brobecker wrote:
> > 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.
> 
> When I reviewed the patches that introduced the generic mechanics for
> reverse debugging, I remember that some cases were particularly
> difficult to understand; or in other words, it was difficult to
> understand what we were supposed to do. Finish was one of the commands
> that were tricky to "reverse", I remember this example clearly.
> 

Me too.  It's confusing because "reverse-finish" isn't really doing a reverse
"finish".  If it were, a "finish", followed by a "reverse-finish" (or the
other way around) would bring you to the original state, like a "step" followed by
a "reverse-step" tries to (it can't be 100% accurate, but still).

 A -> step -> B -> reverse-step -> A
 A -> reverse-step -> C -> step -> A
 A -> finish -> D -> reverse-finish -> E

I think someone just proposed to rename "reverse-finish" to "uncall", that although
may sound weird at first, states much clearly what the "reverse-finish" command
really does.

-- 
Pedro Alves


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