Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI
Date: Wed, 10 Mar 2004 19:02:00 -0000	[thread overview]
Message-ID: <m3n06o8qzz.fsf@gossamer.airs.com> (raw)
In-Reply-To: <20040310184623.GU25204@cygbert.vinschen.de>

Corinna Vinschen <vinschen@redhat.com> writes:

> > Consider this source code:
> > 
> > void __verbose_terminate_handler()
> > {
> >   static int terminating = 0;
> >   if (terminating)
> >     {
> >       return;
> >     }
> >   terminating = 1;
> > }
> > 
> > If you compile it as a C file, do you see the initial underscore on
> > "terminating".  If you compile it as a C++ file, do you see two
> > initial underscores before the 'Z'?  It should be consistent.
> 
> It seems to be consistent:
> 
>   $ nm x.c.o 
>   00000000 T ___verbose_terminate_handler
>   00000000 b terminating.0
> 
>   $ nm x.cc.o
>   00000000 b _ZZ27__verbose_terminate_handlervE11terminating
>   00000000 T __Z27__verbose_terminate_handlerv

Unfortunately, it seems to be consistently wrong.

I think this is a gcc bug.  The symbol prefix should be applied
consistently to symbols whether they are globally or locally visible.
I don't see just where it is happening, though.

Ian


WARNING: multiple messages have this Message-ID
From: Ian Lance Taylor <ian@wasabisystems.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <m3n06o8qzz.fsf@gossamer.airs.com> (raw)
Message-ID: <20040319000900.IOw-YT6JLr6gnAiCnj5cVv60CQyZtkNr80AHLIVSKkE@z> (raw)
In-Reply-To: <20040310184623.GU25204@cygbert.vinschen.de>

Corinna Vinschen <vinschen@redhat.com> writes:

> > Consider this source code:
> > 
> > void __verbose_terminate_handler()
> > {
> >   static int terminating = 0;
> >   if (terminating)
> >     {
> >       return;
> >     }
> >   terminating = 1;
> > }
> > 
> > If you compile it as a C file, do you see the initial underscore on
> > "terminating".  If you compile it as a C++ file, do you see two
> > initial underscores before the 'Z'?  It should be consistent.
> 
> It seems to be consistent:
> 
>   $ nm x.c.o 
>   00000000 T ___verbose_terminate_handler
>   00000000 b terminating.0
> 
>   $ nm x.cc.o
>   00000000 b _ZZ27__verbose_terminate_handlervE11terminating
>   00000000 T __Z27__verbose_terminate_handlerv

Unfortunately, it seems to be consistently wrong.

I think this is a gcc bug.  The symbol prefix should be applied
consistently to symbols whether they are globally or locally visible.
I don't see just where it is happening, though.

Ian


  parent reply	other threads:[~2004-03-10 19:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Corinna Vinschen
2004-03-10 10:57 ` Corinna Vinschen
2004-03-19  0:09 ` Jim Blandy
2004-03-10 15:04   ` Jim Blandy
2004-03-19  0:09 ` Daniel Jacobowitz
2004-03-10 15:08   ` Daniel Jacobowitz
2004-03-10 15:55   ` Corinna Vinschen
2004-03-10 16:04     ` Daniel Jacobowitz
2004-03-10 16:16       ` Corinna Vinschen
2004-03-19  0:09         ` Daniel Jacobowitz
2004-03-10 16:20           ` Daniel Jacobowitz
2004-03-19  0:09           ` Corinna Vinschen
2004-03-10 16:34             ` Corinna Vinschen
2004-03-10 16:37             ` Daniel Jacobowitz
2004-03-10 17:54               ` Corinna Vinschen
2004-03-10 18:02                 ` David Carlton
2004-03-19  0:09                   ` David Carlton
2004-03-10 18:23                 ` Corinna Vinschen
2004-03-19  0:09                   ` Corinna Vinschen
2004-03-22 17:34                   ` Corinna Vinschen
2004-03-22 17:38                     ` Corinna Vinschen
2004-03-25 20:44                   ` Jim Blandy
2004-03-26 13:57                     ` Corinna Vinschen
2004-03-26 17:54                       ` Eli Zaretskii
2004-03-28 18:28                       ` Jim Blandy
2004-03-29 11:26                         ` Corinna Vinschen
2004-03-19  0:09                 ` Daniel Jacobowitz
2004-03-10 18:20                   ` Daniel Jacobowitz
2004-03-19  0:09                 ` Corinna Vinschen
2004-03-19  0:09                 ` Ian Lance Taylor
2004-03-10 18:30                   ` Ian Lance Taylor
2004-03-19  0:09                   ` Corinna Vinschen
2004-03-10 18:46                     ` Corinna Vinschen
2004-03-10 19:02                     ` Ian Lance Taylor [this message]
2004-03-19  0:09                       ` Ian Lance Taylor
2004-03-19  0:09               ` Daniel Jacobowitz
2004-03-10 16:43             ` Corinna Vinschen
2004-03-10 16:46               ` Daniel Jacobowitz
2004-03-19  0:09                 ` Daniel Jacobowitz
2004-03-19  0:09               ` Corinna Vinschen
2004-03-19  0:09         ` Corinna Vinschen
2004-03-19  0:09       ` Daniel Jacobowitz
2004-03-19  0:09     ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2004-03-10 18:03 Michael Elizabeth Chastain
2004-03-19  0:09 ` Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3n06o8qzz.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox