From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24868 invoked by alias); 17 Aug 2009 07:58:47 -0000 Received: (qmail 24857 invoked by uid 22791); 17 Aug 2009 07:58:46 -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-f197.google.com (HELO mail-pz0-f197.google.com) (209.85.222.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Aug 2009 07:58:39 +0000 Received: by pzk35 with SMTP id 35so2048772pzk.24 for ; Mon, 17 Aug 2009 00:58:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.135.13 with SMTP id i13mr615421wfd.17.1250495917079; Mon, 17 Aug 2009 00:58:37 -0700 (PDT) In-Reply-To: <002001ca1f0e$4c9b74a0$e5d25de0$@com> References: <002001ca1f0e$4c9b74a0$e5d25de0$@com> From: Hui Zhu Date: Mon, 17 Aug 2009 07:58:00 -0000 Message-ID: Subject: Re: gdb reverse execution: how to actually run tests for it? To: Jakob Engblom Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00135.txt.bz2 To use the testsuite of reverse: cat /usr/share/dejagnu/baseboards/precord.exp # Testing programs using process record/replay (precord) load_base_board_description "unix" set_board_info gdb,can_reverse 1 set_board_info gdb,use_precord 1 make check RUNTESTFLAGS=3D"break-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"consecutive-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"finish-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"machinestate.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"solib-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"step-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"until-reverse.exp --target_board=3Dprecord" && make check RUNTESTFLAGS=3D"watch-reverse.exp --target_board=3Dprecord" It just test reverse and prec target. If you want test reverse with other target, I think you need change follow code in .exp: runto main if [target_info exists gdb,use_precord] { # Activate process record/replay gdb_test "record" "" "Turn on process record" # FIXME: command ought to acknowledge, so we can test if it succeeded. } Thanks, Hui On Mon, Aug 17, 2009 at 15:42, Jakob Engblom wrote: > I am trying to finally implement the reverse ability for MI commands, but > creating and testing the tests is looking challenging. The fundamental is= sue is > that it seems that I cannot get the regular reverse tests to run, to know= how to > properly code the reverse tests for reverse MI. > > When I run > > $ make check RUNTESTFLAGS=3D"gdb.reverse/*.exp" > > There is a flurry of activity ending in this: > > --- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D=3D=3D gdb tests =3D=3D=3D > > Schedule of variations: > =A0 =A0unix > > Running target unix > Using /usr/share/dejagnu/baseboards/unix.exp as board description file for > target. > Using /usr/share/dejagnu/config/unix.exp as generic interface file for ta= rget. > Using ../../../src/gdb/testsuite/config/unix.exp as tool-and-target-speci= fic > interface file. > Running ../../../src/gdb/testsuite/gdb.reverse/solib-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/step-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/until-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/break-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/finish-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/machinestate.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/consecutive-reverse.exp ... > Running ../../../src/gdb/testsuite/gdb.reverse/watch-reverse.exp ... > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D=3D=3D gdb Summary =3D=3D=3D > > /home/jakob/gdb7/gdb-host-revpatched/gdb/testsuite/../../gdb/gdb version > 6.8.50.20090814-cvs -nw -nx > > make[3]: Leaving directory `/home/jakob/gdb7/gdb-host-revpatched/gdb/test= suite' > make[2]: Leaving directory `/home/jakob/gdb7/gdb-host-revpatched/gdb' > make[1]: Nothing to be done for `check-target'. > make[1]: Leaving directory `/home/jakob/gdb7/gdb-host-revpatched' > --- > > Which seems to indicate that no tests were actually run. This is a 6.8.50= branch > that I checked out of cvs late last week. > > What is required to actually run the reverse tests? Do I need to build my= gdb in > any special way? > > I suspect that this line the test scripts is the cause of the premature e= xit > from the tests: > > --- > if ![target_info exists gdb,can_reverse] { > =A0 =A0return > } > --- > > So how do I make gdb realize that it can indeed reverse itself? > > Best regards, > > /jakob > > _______________________________________________________ > > Jakob Engblom, PhD, Technical Marketing Manager > > Virtutech=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Direct: += 46 8 690 07 47 > Drottningholmsv=E4gen 22=A0=A0=A0=A0=A0 Mobile: +46 709 242 646 > 11243 Stockholm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Web:=A0=A0=A0 www.vir= tutech.com > Sweden > ________________________________________________________ > > > >