From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6803 invoked by alias); 20 Aug 2009 06:04:51 -0000 Received: (qmail 6794 invoked by uid 22791); 20 Aug 2009 06:04:50 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f193.google.com (HELO mail-px0-f193.google.com) (209.85.216.193) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Aug 2009 06:04:43 +0000 Received: by pxi31 with SMTP id 31so201234pxi.24 for ; Wed, 19 Aug 2009 23:04:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.1.2 with SMTP id 2mr1289074wfa.65.1250748282068; Wed, 19 Aug 2009 23:04:42 -0700 (PDT) In-Reply-To: <200908191328.57310.pedro@codesourcery.com> References: <002001ca1f0e$4c9b74a0$e5d25de0$@com> <200908171251.07179.pedro@codesourcery.com> <024f01ca209e$02d81e40$08885ac0$@com> <200908191328.57310.pedro@codesourcery.com> From: Hui Zhu Date: Thu, 20 Aug 2009 06:53:00 -0000 Message-ID: Subject: Re: gdb reverse execution: how to actually run tests for it? To: Pedro Alves Cc: gdb@sourceware.org, Jakob Engblom , Michael Snyder 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/msg00193.txt.bz2 On Wed, Aug 19, 2009 at 20:28, Pedro Alves wrote: > On Wednesday 19 August 2009 08:23:54, Jakob Engblom wrote: >> > # Create an empty file named site.exp. >> > # Create a directory named boards in the same location as site.exp. >> > # Create a file named native-gdbserver.exp in the boards directory (see >> below). >> > # Set the DEJAGNU environment variable to point to the empty site.exp. >> > # Run the testsuite with make check-gdb RUNTESTFLAGS=3D"--target_board= native- >> > gdbserver". >> >> Should such files be part of the gdb source tree, so that the tests for = reverse >> can be run without having to set up a local special board? > > For the generic reverse execution tests --- reverse step, reverse next, > reverse continue, run to breakpoint in reverse, etc., etc., I'd must pref= er > that we would get rid of the need for board files at all. =A0:-) > > =A01. for native targets, the only reverse solution we currently support = is > =A0precord. =A0I can't see why we can't default to testing the reverse te= sts > =A0with precord then. =A0We could still leave the possibility of a dejagnu > =A0board variable changing this defaulting, but I don't think we need > =A0it currently. =A0Of course, this would be filtered on selected targets. > =A0Something along these lines in testsuite/lib/gdb.exp: > > proc run_reverse_tests_with_precord {} { > > =A0# Board requested it explicitly. =A0Might want to try > =A0# precord against gdbserver. > =A0if [target_info exists gdb,use_precord] { > =A0 =A0return 1 > =A0} > > =A0if { [isnative] && ([istarget "i?86-*-linux*"] || [istarget "x86_64-*-= linux*"]) } then { > =A0 =A0# Nothing else supports precord, yet. > =A0 =A0return 1 > =A0} > > =A0# Nope, don't use precord. =A0Maybe the target supports reverse > =A0# debugging in some other way (e.g., a remote full system emulator) > =A0return 0 > } > > Then have the tests check run_reverse_tests_with_precord instead of > checking "target_info exists gdb,use_precord". > I think it's very useful. Thanks. Hui