From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10438 invoked by alias); 20 May 2005 14:12:52 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10290 invoked from network); 20 May 2005 14:12:44 -0000 Received: from unknown (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org with SMTP; 20 May 2005 14:12:44 -0000 Received: from zaretski (IGLD-83-130-247-87.inter.net.il [83.130.247.87]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id BGY77625 (AUTH halo1); Fri, 20 May 2005 17:12:02 +0300 (IDT) Date: Fri, 20 May 2005 14:12:00 -0000 From: "Eli Zaretskii" To: Johan Rydberg Message-ID: <01c55d45$Blat.v2.4$913abec0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: dan@shearer.org, gdb@sources.redhat.com In-reply-to: <428DD67E.2030507@virtutech.com> (message from Johan Rydberg on Fri, 20 May 2005 14:22:22 +0200) Subject: Re: [discuss] Support for reverse-execution Reply-to: Eli Zaretskii References: <20050519012254.GZ19642@erizo.shearer.org> <428C8E04.3000305@virtutech.com> <01c55d27$Blat.v2.4$69471120@zahav.net.il> <428DD67E.2030507@virtutech.com> X-SW-Source: 2005-05/txt/msg00215.txt.bz2 > Date: Fri, 20 May 2005 14:22:22 +0200 > From: Johan Rydberg > Cc: dan@shearer.org, gdb@sources.redhat.com > > (1) foo (i); > 0: 80 7f 00 08 lwz r3,8(r31) > 4: 48 00 00 01 bl X > 8: nop > (2) i = 0; > c: 38 00 00 00 li r0,0 > 10: 90 1f 00 08 stw r0,8(r31) > > : > .... > 4c: 4e 80 00 20 blr > > You start with PC = c, and single steps backwards. You end up on > the nop-insn. This is inside the single step range of line 1. So > you single step another instruction backwards, and suddenly you > stop at PC = 4c I guess I don't understand how backwards movement works, because I thought stepping backwards over the branch instruction does _not_ take the branch, but rather rewinds the machine state to what it was before the branch instruction. Anyway, thanks for the explanations. > >>+ add_com_alias ("rn", "rnext", class_run, 1); > > > > Do we want another alias called "previous"? > > I think so, and maybe also "prev" and/or "pre". The additional aliases won't be necessary, since they both are unambiguous abbreviations of "previous". So they will work even if we don't define them as aliases.