From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12581 invoked by alias); 17 Aug 2009 18:18:31 -0000 Received: (qmail 12572 invoked by uid 22791); 17 Aug 2009 18:18:30 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,J_CHICKENPOX_73 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Aug 2009 18:18:24 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 6F35F35007; Mon, 17 Aug 2009 11:18:22 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost4.vmware.com (Postfix) with ESMTP id 65A81C9A2C; Mon, 17 Aug 2009 11:18:22 -0700 (PDT) Message-ID: <4A899E2E.6080203@vmware.com> Date: Mon, 17 Aug 2009 18:24:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Pedro Alves CC: "gdb@sourceware.org" , Jakob Engblom Subject: Re: gdb reverse execution: how to actually run tests for it? References: <002001ca1f0e$4c9b74a0$e5d25de0$@com> <002101ca1f2e$746e1ad0$5d4a5070$@com> <200908171251.07179.pedro@codesourcery.com> In-Reply-To: <200908171251.07179.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00149.txt.bz2 Hello Jakob -- welcome back! Pedro's reply below includes answers to most of your questions. This is some background. It is normal for those of us doing development on new or unusual platforms to need to define a "board description file", to let Dejagnu know how to do certain things with our target. See "site.exp" in Pedro's email. For the reverse debugging tests, I used this guard variable to make sure the tests would only run on targets that were explicitly tagged as being reverse-capable: if ![target_info exists gdb,can_reverse] { return } So you will want to have this in your board description file: set_board_info gdb,can_reverse 1 Secondly, there are a few commands that are specific to "process record", so I guarded them with this variable: if [target_info exists gdb,use_precord] { # Activate process record/replay gdb_test "record" "" "Turn on process record" } You won't want to use those commands, so you will not define that variable in your board description. If there are any commands that are unique to your implementation, you can define your own guard variable and add them to the tests. Thanks Michael Pedro Alves wrote: > On Monday 17 August 2009 12:32:50, Jakob Engblom wrote: >>> make check RUNTESTFLAGS="break-reverse.exp --target_board=precord" && >> I had to do >> >> make check RUNTESTFLAGS="gdb.reverse/break-reverse.exp --target_board=precord" >> >> >> To make this work, after creating the precord.exp file in >> /usr/share/dejagnu/baseboards/ >> > > You don't really need to clobber that directory. > > See: > http://sourceware.org/gdb/wiki/TestingGDB#head-4eade7db27381c0f4747113b6edea1b8f365d73f > > # 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="--target_board native-gdbserver". > > Adjust as needed, of course. > > Although, needing to set "gdb,use_precord" seems weird > though. Can't we make it so that if we're testing a native > gdb, and, if the target matches a list of targets that support > precord, then, well, claim support for reverse, and test with precord? > That is, get rid of the need for a board file at all unless testing > against a remote target that supports reverse. > > In any case, for the cases a board file is needed for testing > reverse, it would be nice to have that explained in the > wiki (or somewhere else). >