From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI
Date: Wed, 10 Mar 2004 16:34:00 -0000 [thread overview]
Message-ID: <20040310163416.GP25204@cygbert.vinschen.de> (raw)
Message-ID: <20040310163400.yh8rka3Gc6DL6RTwLyEx0lMnzY83xsL5bKDEUmsOifs@z> (raw)
In-Reply-To: <20040310162011.GA1067@nevyn.them.org>
On Mar 10 11:20, Daniel Jacobowitz wrote:
> On Wed, Mar 10, 2004 at 05:16:17PM +0100, Corinna Vinschen wrote:
> > On Mar 10 11:04, Daniel Jacobowitz wrote:
> > > > > to me like you are having a problem with leading underscores, if I
> > > > > remember my sh-elf-foo correctly.
> > > >
> > > > Could you tell more about that? I see a big bunch of symbols beginning
> > > > with "__Z". Is that what you mean?
> > >
> > > Yes, precisely. On sh-elf all symbols are prefixed with an underscore.
> > > I've been curious for a while about where, precisely, the leading
> > > underscore is supposed to get stripped before we demangle; apparently,
> > > the answer is "not early enough".
> >
> > Ok, I think I see now what happens.
> >
> > There are symbols beginning with "_Z" and (the most) beginning with "__Z".
> >
> > The symbols beginning with "_Z" are correctly recognized as language_cplus.
> >
> > The symbols beginning with "__Z" are still language_auto after
> > prim_record_minimal_symbol_and_info has been called, since the demangler
> > in libiberty doesn't recognize them.
>
> Wait a sec, why is that happening? Either everything should have a
> leading _ or nothing should!
I'm not sure if I understand the question. All symbols have leading
underscores, some (actually just one!) have one underscore, all others
have two underscores. I have no idea why that happens, it's what gcc
3.4 generates, I guess.
I checked the C++ demangler in libiberty again and it requires that
the symbols begin with "_Z", not with "__Z".
> > So, after this loop SYMBOL_LINKAGE_NAME begins with "Z" for the first
> > set of symbols (which *are* recognized as cplus variables) and with
> > "_Z" for the second set of symbols (which are still auto). But now
> > SYMBOL_DEMANGLED_NAME is only called for the second set of symbols
> > and SYMBOL_DEMANGLED_NAME returns NULL for those symbols.
> >
> > What can we do?!?
>
> Move the check earlier? It should not be necessary to change
> SYMBOL_LINKAGE_NAME. I think you could do this in
> prim_record_minimal_symbol_and_info at the call site of
> SYMBOL_SET_NAMES.
I'm more and more under the impression that the problem is raised due
to a bug in the symbol generation in gcc. It doesn't seem worth to
change GDB proactively...
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
next prev parent reply other threads:[~2004-03-10 16:34 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 ` 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 [this message]
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
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
2004-03-19 0:09 ` Jim Blandy
2004-03-10 15:04 ` Jim Blandy
-- 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=20040310163416.GP25204@cygbert.vinschen.de \
--to=vinschen@redhat.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