From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10431 invoked by alias); 15 Dec 2014 11:12:05 -0000 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 Received: (qmail 10415 invoked by uid 89); 15 Dec 2014 11:12:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 15 Dec 2014 11:12:03 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBFBBw35020202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Dec 2014 06:11:58 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBFBBtrH022908; Mon, 15 Dec 2014 06:11:57 -0500 Message-ID: <548EC1FB.3030306@redhat.com> Date: Mon, 15 Dec 2014 11:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Doug Evans , Yao Qi CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] testsuite/boards/stabs.exp References: <87ioheviwk.fsf@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-12/txt/msg00373.txt.bz2 On 12/14/2014 07:05 AM, Doug Evans wrote: > On Sat, Dec 13, 2014 at 10:34 PM, Yao Qi wrote: >> Doug Evans writes: > b) The testsuite gets the -g* variant to use from the debug_flags board config. > If you specify CFLAGS_FOR_TARGET then that value *and* the > debug_flags board config are passed to gcc. > Plus, -g -gstabs != -gstabs -g. > [I didn't dig into why, easy enough if it becomes important.] > The high order bit is that the right way to specify the flag > to control the debug format is with the debug_flags board config. > > The difference can be seen by trying both. > A simple example to play with is gdb.cp/bool.exp. > > check-gdb --target_board=stabs bool.exp > -> 2 fails > FAIL: gdb.cp/bool.exp: print return_true() > FAIL: gdb.cp/bool.exp: print return_false() > > check-gdb CFLAGS_FOR_TARGET=-gstabs bool.exp > -> 2 passes No objections to a board file if it makes things easy, but did you consider allowing passing a variable from the command line, to override debug_flags, so we could do things like: $ make check DEBUG_FLAGS="-gstabs" bool.exp $ make check DEBUG_FLAGS="-gstabs" RUNTESTFLAGS="--host_board=foo --target_board=bar" bool.exp ? Thanks, Pedro Alves