From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14809 invoked by alias); 14 Dec 2014 07:05:25 -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 14789 invoked by uid 89); 14 Dec 2014 07:05:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f171.google.com Received: from mail-wi0-f171.google.com (HELO mail-wi0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 14 Dec 2014 07:05:20 +0000 Received: by mail-wi0-f171.google.com with SMTP id bs8so6056394wib.10 for ; Sat, 13 Dec 2014 23:05:16 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.60.19 with SMTP id d19mr9685022wjr.48.1418540716810; Sat, 13 Dec 2014 23:05:16 -0800 (PST) Received: by 10.27.132.70 with HTTP; Sat, 13 Dec 2014 23:05:16 -0800 (PST) In-Reply-To: <87ioheviwk.fsf@codesourcery.com> References: <87ioheviwk.fsf@codesourcery.com> Date: Sun, 14 Dec 2014 07:05:00 -0000 Message-ID: Subject: Re: [PATCH] testsuite/boards/stabs.exp From: Doug Evans To: Yao Qi Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00347.txt.bz2 On Sat, Dec 13, 2014 at 10:34 PM, Yao Qi wrote: > Doug Evans writes: > >> The easiest way for me to remember how to run the testsuite in a certain >> configuration is if there is a board file for it. > > Alternatively, we can referencehttps://sourceware.org/gdb/wiki/TestingGDB , > passing CFLAGS_FOR_TARGET='-gstabs' to dejagnu is convenient too, so I > don't see the necessity to add a new board file to do that. Not as convenient. And CFLAGS_FOR_TARGET is actually not the same. [May seem weird at first, but if you dig into it, it's not that weird.] a) I can ls testsuite/boards trivially. 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 Is there something about adding a board file that causes problems I'm not aware of? If so, we'd better establish what it is and get it written down. I can imagine wanting more board files. :-)