From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32573 invoked by alias); 19 Dec 2008 13:22:42 -0000 Received: (qmail 32563 invoked by uid 22791); 19 Dec 2008 13:22:41 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Dec 2008 13:22:06 +0000 Received: (qmail 5242 invoked from network); 19 Dec 2008 13:22:04 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 Dec 2008 13:22:04 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: reverse for GDB/MI Date: Fri, 19 Dec 2008 13:22:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , Tomas Holmberg , Vladimir Prus References: <49463870.6080302@virtutech.com> <494B5A82.4020004@virtutech.com> <20081219110636.GA3793@adacore.com> In-Reply-To: <20081219110636.GA3793@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812191322.09555.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00343.txt.bz2 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