From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18698 invoked by alias); 3 Sep 2009 20:13:29 -0000 Received: (qmail 18688 invoked by uid 22791); 3 Sep 2009 20:13:28 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Sep 2009 20:13:21 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 181C19025; Thu, 3 Sep 2009 13:13:20 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id 0B082CD90A; Thu, 3 Sep 2009 13:13:20 -0700 (PDT) Message-ID: <4AA0233B.20900@vmware.com> Date: Thu, 03 Sep 2009 20:13:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Jakob Engblom CC: 'Vladimir Prus' , "gdb-patches@sources.redhat.com" Subject: Re: GDB MI Reverse Commands added [3 of 3] References: <00d001ca265a$ddd0c800$99725800$@com> <018401ca2cc6$7c2581a0$747084e0$@com> In-Reply-To: <018401ca2cc6$7c2581a0$747084e0$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-09/txt/msg00091.txt.bz2 Jakob Engblom wrote: >> Also, I would appreciate if this: >> >> # Test exec-reverse-next >> # FIXME: Why does it take 2 next commands to get back to the >> # previous line? >> >> were somehow addressed. I am not familiar with details of reverse behaviour, > so I >> did not even try to check that the tested commands and locations, etc, are > right. > > Since this is tested on top of process record, I think I am not the best person > to answer... but in general, what tends to happen in reverse in my experience is > this: > > We have lines of code (or instructions) > > A > B > > And we stop with a breakpoint in line B. > > We are then at the end of B, or in the middle of B, in the execution. Let's say lines of code, then -- it doesn't generally make sense to be stopped in the middle of an instruction. So to make sure we are on the same page -- we've stopped at a breakpoint in the *MIDDLE* of line B? > Then, doing reverse one step/instruction/line will move you to the start of B. > > And another step/instruction/line moves you to before A was executed. > > Does that make sense for process record? It does under the assumptions that I named above. I suppose if we were talking about instructions that can be interrupted in the middle, it might make sense there too.