From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org, Keith Seitz <keiths@redhat.com>
Subject: Re: Is physname mangled or not? (PR c++/8216)
Date: Wed, 04 May 2011 17:57:00 -0000 [thread overview]
Message-ID: <20110504175725.GA5907@host1.jankratochvil.net> (raw)
In-Reply-To: <201105041732.p44HWhvj008763@d06av02.portsmouth.uk.ibm.com>
On Wed, 04 May 2011 19:32:43 +0200, Ulrich Weigand wrote:
> Jan Kratochvil wrote:
> + For full symbols return its demangled form of view of the linker, that is
> + with typedefs and toplevel const/volatile qualifiers of parameters removed,
> + for `f(int_typedef const)' it is `f(int)'. If no typedefs/qualifiers are
> + in use it's the same as SYMBOL_NATURAL_NAME. The mangled symbol name is not
> + available for full symbols. */
>
> is not fully accurate either. As far as I can tell, that *is* true for
> symbols read in by the DWARF reader. However, for symbols read in by
> the stabs reads (or any of the others), SYMBOL_LINKAGE_NAME still refers
> to the mangled name ... (Which strikes me as quite odd in the first
> place; how is common code supposed to use this field?)
Thanks for the update. Yes, SYMBOL_LINKAGE_NAME is somehow broken now for
many use cases, I do not know myself what is the best way out now.
> > With a GCC debug/ fix it should work. Do you agree with its filing?
>
> It seems that by now we have agreement that GCC is correct here.
I haven't found in the C++ spec. why it isn't a different way but that is out
of topic here, the truth is the current linkage name is `C<int>::C()'.
> So I guess I see two options remaining:
>
> - Code a test that compares class name and (demangled) function name, but
> explicitly removes template instance parameters first
I find it as a good idea.
> - Have the symbol reader call is_constructor_name on the mangled name while
> it is still available, and store that information somewhere in the type
> information
The mangled name is never read (processed) from the DWARF file now.
Thanks,
Jan
next prev parent reply other threads:[~2011-05-04 17:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 18:59 Ulrich Weigand
2011-05-04 15:09 ` Jan Kratochvil
2011-05-04 17:00 ` Daniel Jacobowitz
2011-05-04 17:10 ` Jan Kratochvil
2011-05-04 17:33 ` Ulrich Weigand
2011-05-04 17:57 ` Jan Kratochvil [this message]
2011-05-04 17:58 ` Daniel Jacobowitz
2011-05-05 17:10 ` Ulrich Weigand
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=20110504175725.GA5907@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=uweigand@de.ibm.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