From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12948 invoked by alias); 7 Sep 2009 01:44:17 -0000 Received: (qmail 12938 invoked by uid 22791); 7 Sep 2009 01:44:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f175.google.com (HELO mail-pz0-f175.google.com) (209.85.222.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Sep 2009 01:44:08 +0000 Received: by pzk5 with SMTP id 5so2087410pzk.10 for ; Sun, 06 Sep 2009 18:44:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.1.24 with SMTP id 24mr508839wfa.73.1252287846081; Sun, 06 Sep 2009 18:44:06 -0700 (PDT) In-Reply-To: <018401ca2cc6$7c2581a0$747084e0$@com> References: <00d001ca265a$ddd0c800$99725800$@com> <018401ca2cc6$7c2581a0$747084e0$@com> From: Hui Zhu Date: Mon, 07 Sep 2009 01:44:00 -0000 Message-ID: Subject: Re: GDB MI Reverse Commands added [3 of 3] To: Jakob Engblom Cc: Vladimir Prus , gdb-patches@sources.redhat.com, Michael Snyder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00151.txt.bz2 On Fri, Sep 4, 2009 at 02:43, Jakob Engblom wrote: >> The file should be called mi-reverse.exp, I think, because mi2- files are >> supposed to test >> that whatever was once announced as MI2 is not broken. And this is new >> development. Likewise, > > Done. > >> =A0 =A0 =A0 =A0 set MIFLAGS "-i=3Dmi2" >> >> should be: >> >> =A0 =A0 =A0 =A0 set MIFLAGS "-i=3Dmi" > > Done. > >> Also, I would appreciate if this: >> >> =A0 =A0 # Test exec-reverse-next >> =A0 =A0 # FIXME: Why does it take 2 next commands to get back to the >> =A0 =A0 # =A0 =A0 =A0 =A0previous line? >> >> were somehow addressed. I am not familiar with details of reverse behavi= our, > so I >> did not even try to check that the tested commands and locations, etc, a= re > 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 experi= ence 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. > > 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? I am not sure. Let me talk what I think about it. The instruction is: A B When inferior stop at B by breakpoint of line. We are in the begin of B. GDB will show we are in B. A <----------- This is inferior at. PC is point to B. B reverse-stepi We are in the begin of A. GDB will show we are in A. <----------- This is inferior at. PC is point to A. A B Thanks, Hui