From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5230 invoked by alias); 15 Nov 2012 18:14:34 -0000 Received: (qmail 5218 invoked by uid 22791); 15 Nov 2012 18:14:33 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 18:14:24 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAFIEKRY005572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 15 Nov 2012 13:14:20 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAFIEImJ013914; Thu, 15 Nov 2012 13:14:19 -0500 Message-ID: <50A530FA.1020604@redhat.com> Date: Thu, 15 Nov 2012 18:14:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Pierre Muller CC: "'Joel Brobecker'" , gdb@sourceware.org Subject: Re: [RFC] ARI related: Use of GCC poison pragma References: <009b01cdc30f$c7684e80$5638eb80$@muller@ics-cnrs.unistra.fr> <20121115151350.GB3806@adacore.com> <50a51777.47f0440a.09dd.2b79SMTPIN_ADDED@mx.google.com> In-Reply-To: <50a51777.47f0440a.09dd.2b79SMTPIN_ADDED@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: 2012-11/txt/msg00039.txt.bz2 On 15-11-2012 16:25, Pierre Muller wrote: > > >> -----Message d'origine----- >> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part >> de Joel Brobecker >> Envoyé : jeudi 15 novembre 2012 16:14 >> À : Pierre Muller >> Cc : gdb@sourceware.org >> Objet : Re: [RFC] ARI related: Use of GCC poison pragma >> >>> To avoid resurgence of expunged ARI problems, >>> Pedro suggested the use of GCC poison pragma. > Yes, Pedro talked about simply removing the > function completely. >> I believe it was Tom, actually. > and Tom suggested use of poison pragma. Yes, and believe it or not, before suggesting that, I actually wrote a patch that copied over the poison stuff from GCC into GDB. :-) I did it to easily see where the function was still used. But the only usages that revealed were in the function definition itself, and so I just pointed out that it can just be removed. I then deleted the patch I had, as thinking that it wasn't _that_ useful. For gcc it's more useful as it still does a lot of things with target macros, instead of target methods. Poisoning gdb functions IMO doesn't have that much value, since once you remove them, you can't use them anymore anyway without the compiler or linker complaining. It could be more useful for symbols from libiberty we might not want to use, for instance. So I still say, just remove the unused function. Poisoning that particular symbol afterwards doesn't add anything. > >>> What would be the corresponding gdb file? I suppose it would be >>> defs.h >> >> I agree that defs.h should be a good place for it. >> >>> So would a patch adding >>> #if (GCC_VERSION >= 3000) >>> #pragma GCC poison xvasprintf >>> #endif >> >> I don't think we really need the GCC_VERSION check, do we? > > I still think that this should only be > parsed by GCC. > So a conditional to restrict to GCC compiler is needed, > but I suppose you meant that the use of a GCC prior to 3000 > is not needed... > > Pierre > > > -- Pedro Alves