From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7364 invoked by alias); 15 Jan 2014 12:46:51 -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 7336 invoked by uid 89); 15 Jan 2014 12:46:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp15.uk.ibm.com Received: from e06smtp15.uk.ibm.com (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 15 Jan 2014 12:46:49 +0000 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Jan 2014 12:46:45 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 15 Jan 2014 12:46:43 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 233832190059 for ; Wed, 15 Jan 2014 12:46:41 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0FCkUqp18612352 for ; Wed, 15 Jan 2014 12:46:30 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0FCkff3017877 for ; Wed, 15 Jan 2014 05:46:42 -0700 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-219.boeblingen.de.ibm.com [9.152.212.219]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s0FCkf2r017861; Wed, 15 Jan 2014 05:46:41 -0700 From: Andreas Arnez To: Tom Tromey Cc: gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [PATCH] Prevent appending "-g" after "-g3" to compile options in info-macros.exp. References: <87k3e231cc.fsf@br87z6lw.de.ibm.com> <87d2juwj2x.fsf@fleche.redhat.com> Date: Wed, 15 Jan 2014 12:46:00 -0000 In-Reply-To: <87d2juwj2x.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 14 Jan 2014 10:48:22 -0700") Message-ID: <87fvop2z0u.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14011512-0342-0000-0000-00000774BDDD X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00501.txt.bz2 On Tue, Jan 14 2014, Tom Tromey wrote: >>>>>> "Andreas" == Andreas Arnez writes: > > Andreas> 2014-01-14 Andreas Arnez > Andreas> * gdb.base/info-macros.exp: Remove "debug" from the compile > Andreas> options. > > Andreas> -set options "debug additional_flags=-g3" > Andreas> +set options "additional_flags=-g3" > > Would you mind adding a comment explaining why "debug" doesn't appear > here? Ok with that. Sure. How about this? ----- Subject: [PATCH] Prevent appending "-g" after "-g3" to compile options in info-macros.exp. When upstream gcc is given a command line with "-g3" followed by "-g", it doesn't generate a ".debug_macro" section. This is because the last option wins, thus downgrading the debug level again. Without any macro debug information in the executable, info-macros.exp obviously yields many failures. Since "-g" is appended by DejaGnu's target_compile whenever the "debug" option is set, the fix just removes that option. testsuite/ 2014-01-15 Andreas Arnez * gdb.base/info-macros.exp: Remove "debug" from the compile options. --- gdb/testsuite/gdb.base/info-macros.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/info-macros.exp b/gdb/testsuite/gdb.base/info-macros.exp index ff889f4..798d9b5 100644 --- a/gdb/testsuite/gdb.base/info-macros.exp +++ b/gdb/testsuite/gdb.base/info-macros.exp @@ -27,7 +27,9 @@ if ![test_compiler_info gcc*] { return -1 } -set options "debug additional_flags=-g3" +# Don't use "debug" here. Otherwise "-g" would be appended to the gcc +# command line, possibly overriding "-g3" (depending on gcc version). +set options "additional_flags=-g3" if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $options] } { untested ${testfile}.exp -- 1.8.3.1