From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29968 invoked by alias); 7 May 2009 02:35:29 -0000 Received: (qmail 29953 invoked by uid 22791); 7 May 2009 02:35:27 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.184) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 May 2009 02:35:22 +0000 Received: by ti-out-0910.google.com with SMTP id a1so36738tib.12 for ; Wed, 06 May 2009 19:35:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.92.8 with SMTP id p8mr128514tib.56.1241663719532; Wed, 06 May 2009 19:35:19 -0700 (PDT) In-Reply-To: <83r5z2c91n.fsf@gnu.org> References: <83r5z2c91n.fsf@gnu.org> Date: Thu, 07 May 2009 02:35:00 -0000 Message-ID: Subject: Re: [doc/RFA] Describe reverse execution with process record and replay From: Hui Zhu To: Eli Zaretskii Cc: gdb-patches@sourceware.org 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-05/txt/msg00145.txt.bz2 This is great! Thanks, Hui On Thu, May 7, 2009 at 03:42, Eli Zaretskii wrote: > Would people please eyeball the text below and see if my understanding > of the code and what's been said here recently is correct? > > 2009-05-06 =A0Eli Zaretskii =A0 > > =A0 =A0 =A0 =A0* gdb.texinfo (Process Record and Replay): Add description= of > =A0 =A0 =A0 =A0reverse execution. > > Index: gdb/doc/gdb.texinfo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v > retrieving revision 1.589 > diff -u -r1.589 gdb.texinfo > --- gdb/doc/gdb.texinfo 1 May 2009 09:11:24 -0000 =A0 =A0 =A0 1.589 > +++ gdb/doc/gdb.texinfo 6 May 2009 19:40:37 -0000 > @@ -5008,10 +5008,9 @@ > =A0@cindex process record and replay > =A0@cindex recording inferior's execution and replaying it > > -In an architecture environment that supports process recording and > -replay, a special @dfn{process record and replay} target can record a > -log of the process execution, and replay it later with both forward > -and reverse execution commands. > +On some platforms, @value{GDBN} provides a special @dfn{process record > +and replay} target that can record a log of the process execution, and > +replay it later with both forward and reverse execution commands. > > =A0@cindex replay mode > =A0When this target is in use, if the execution log includes the record > @@ -5021,7 +5020,8 @@ > =A0code execution are taken from the execution log. =A0While code is not > =A0really executed in replay mode, the values of registers (including the > =A0program counter register) and the memory of the inferior are still > -changed as they normally would. > +changed as they normally would. =A0Their contents are taken from the > +execution log. > > =A0@cindex record mode > =A0If the record for the next instruction is not in the execution log, > @@ -5029,6 +5029,18 @@ > =A0inferior executes normally, and @value{GDBN} records the execution log > =A0for future replay. > > +The process record and replay target supports reverse execution > +(@pxref{Reverse Execution}), even if the platform on which the > +inferior runs does not. =A0However, the reverse execution is limited in > +this case by the range of the instructions recorded in the execution > +log. =A0In other words, reverse execution on platforms that don't > +support it directly can only be done in the replay mode. > + > +When debugging in the reverse direction, @value{GDBN} will work in > +replay mode as long as the execution log includes the record for the > +previous instruction; otherwise, it will work in record mode, if the > +platform supports reverse execution, or stop if not. > + > =A0For architecture environments that support process record and replay, > =A0@value{GDBN} provides the following commands: > >