This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: [RFC] ARI related: Use of GCC poison pragma
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Pedro Alves'" <palves at redhat dot com>
- Cc: "'Joel Brobecker'" <brobecker at adacore dot com>, <gdb at sourceware dot org>
- Date: Thu, 15 Nov 2012 21:12:44 +0100
- 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> <50A530FA.1020604@redhat.com>
> -----Message d'origine-----
> De?: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> de Pedro Alves
> Envoyé?: jeudi 15 novembre 2012 19:14
> À?: Pierre Muller
> Cc?: 'Joel Brobecker'; gdb@sourceware.org
> Objet?: Re: [RFC] ARI related: Use of GCC poison pragma
>
> 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.
But we could poison function that do exist
in standard includes like
sprint for example, no?
Pierre