From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: gdb-patches@sourceware.org, keiths@redhat.com (Keith Seitz)
Subject: Re: Is physname mangled or not? (PR c++/8216)
Date: Wed, 04 May 2011 17:33:00 -0000 [thread overview]
Message-ID: <201105041732.p44HWhvj008763@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <20110504150846.GA27179@host1.jankratochvil.net> from "Jan Kratochvil" at May 04, 2011 05:08:46 PM
Jan Kratochvil wrote:
> This physname change broke more issues, thanks for finding this one.
> The change I described in the bottom patch of:
> Re: [RFA] Typedef'd method parameters [2/4]
> http://sourceware.org/ml/gdb-patches/2011-04/msg00524.html
> that is the part:
> The mangled symbol name is not available for full symbols. */
> #define SYMBOL_LINKAGE_NAME(symbol) (symbol)->ginfo.name
Hmm, unless I'm missing something your comment
+ 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?)
> > So I guess my question is, how is this supposed to work? Should
> > is_constructor_name accept demangled names?
>
> It cannot - it does not know the type name, does it?
Right, good point.
> > Should there be some generic routine that instead tests a demangled name for
> > whether it is a constructor (or destructor)?
>
> 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. 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
or
- 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
Thoughts?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2011-05-04 17:33 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 [this message]
2011-05-04 17:57 ` Jan Kratochvil
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=201105041732.p44HWhvj008763@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=keiths@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