* ABI demangling problems
@ 2004-06-20 0:23 Asfand Yar Qazi
2004-06-22 16:45 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Asfand Yar Qazi @ 2004-06-20 0:23 UTC (permalink / raw)
To: gcc-help
Hi,
I'm using the abi::__cxa_demangle() function, and it doesn't
recognise the names 'l' (for long) and other similar names. This
seems to be new behaviour since the change to G++ 3.4.0 from
3.3.3. (where the names for long, char etc. were demangled fine.)
How can I demangle the names for long (l), char(c), unsigned
char(h), etc.?
Thanks,
Asfand Yar
--
http://www.it-is-truth.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ABI demangling problems
2004-06-20 0:23 ABI demangling problems Asfand Yar Qazi
@ 2004-06-22 16:45 ` Ian Lance Taylor
2004-06-22 21:44 ` Asfand Yar Qazi
0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2004-06-22 16:45 UTC (permalink / raw)
To: Asfand Yar Qazi; +Cc: gcc-help
Asfand Yar Qazi <email@asfandyar.cjb.net> writes:
> I'm using the abi::__cxa_demangle() function, and it doesn't recognise
> the names 'l' (for long) and other similar names. This seems to be
> new behaviour since the change to G++ 3.4.0 from 3.3.3. (where the
> names for long, char etc. were demangled fine.) How can I demangle the
> names for long (l), char(c), unsigned char(h), etc.?
Can you give an example of what you mean?
I don't know if this is what you are referring to, but note that the
demangler does not demangle single character typenames. I think that
is a dumb rule, but it follows the API described here:
http://www.codesourcery.com/cxx-abi/abi.html#demangler
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ABI demangling problems
2004-06-22 16:45 ` Ian Lance Taylor
@ 2004-06-22 21:44 ` Asfand Yar Qazi
2004-06-23 12:05 ` Eljay Love-Jensen
0 siblings, 1 reply; 5+ messages in thread
From: Asfand Yar Qazi @ 2004-06-22 21:44 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
Ian Lance Taylor wrote:
> Asfand Yar Qazi <email@asfandyar.cjb.net> writes:
>
>
>>I'm using the abi::__cxa_demangle() function, and it doesn't recognise
>>the names 'l' (for long) and other similar names. This seems to be
>>new behaviour since the change to G++ 3.4.0 from 3.3.3. (where the
>>names for long, char etc. were demangled fine.) How can I demangle the
>>names for long (l), char(c), unsigned char(h), etc.?
>
>
> Can you give an example of what you mean?
>
> I don't know if this is what you are referring to, but note that the
> demangler does not demangle single character typenames. I think that
> is a dumb rule, but it follows the API described here:
> http://www.codesourcery.com/cxx-abi/abi.html#demangler
>
> Ian
>
>
Well it USED to in 3.3.3. That is a silly rule. Sigh... I'll
just have to put in the single character stuff manually. I wish
there was a standard C++ way of doing demangling in the official
standard (C++0x perhaps?).
Thanks
--
http://www.it-is-truth.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ABI demangling problems
2004-06-22 21:44 ` Asfand Yar Qazi
@ 2004-06-23 12:05 ` Eljay Love-Jensen
2004-06-23 13:29 ` Asfand Yar Qazi
0 siblings, 1 reply; 5+ messages in thread
From: Eljay Love-Jensen @ 2004-06-23 12:05 UTC (permalink / raw)
To: Asfand Yar Qazi; +Cc: gcc-help
Hi Asfand,
>I wish there was a standard C++ way of doing demangling in the official
standard (C++0x perhaps?).
Depending on your viewpoint, either unfortunately (or fortunately), the
official standard C++ does not address C++ ABI.
My viewpoint is that it is "unfortunately".
I presume the ISO/IEC C++ WG either thinks it is "fortunately", or that
standardizing the C++ ABI is a can-of-worms that they didn't want to
tackle. (I believe the various C++ compiler vendors had a strong influence
in the decision to let the C++ ABI be someone elses problem, and not part
of the C++ ISO 14882 standard.)
That said, there appears to be a C++ compiler vendor-level initiative of
sorts to (de facto) standardize the C++ ABI. That's as "grassroots" as can
be, in this situation. Don't hold your breath to await compliance from all
your favorite C++ compiler vendors!
What would C++ ABI standardization compliance provide? All C++ names
mangled the same way. Exception handling handled the same way. RTTI
handled the same way (including POD types). All stacks (on a given
architecture/OS) structured the same way. All calling conventions the
same. All C++ infrastructure the same (such as initializations of
statics), handled the same way. Anonymous namespaces would probably be
handled the same way (and not pollute the TOC with random munged names
different from compile-to-compile!). Instantiated templates would be
compiler agnostic. Different pre-built binary libraries (.a, .so, .shlib,
.library, .dll, .lib, whatever) would be compiler agnostic. All intrusive
(in the shared header files) extensions would be strongly discouraged by
the developer community at large. And that's probably just the tip of the
iceberg.
I have not been following the progress of the vendor-level initiative C++
ABI de facto standard. I don't expect it to be completed and implemented
within my lifetime.
Sincerely,
--Eljay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ABI demangling problems
2004-06-23 12:05 ` Eljay Love-Jensen
@ 2004-06-23 13:29 ` Asfand Yar Qazi
0 siblings, 0 replies; 5+ messages in thread
From: Asfand Yar Qazi @ 2004-06-23 13:29 UTC (permalink / raw)
To: Eljay Love-Jensen; +Cc: gcc-help
Eljay Love-Jensen wrote:
> Hi Asfand,
>
> >I wish there was a standard C++ way of doing demangling in the
> official standard (C++0x perhaps?).
>
> Depending on your viewpoint, either unfortunately (or fortunately), the
> official standard C++ does not address C++ ABI.
>
> My viewpoint is that it is "unfortunately".
>
Actually, all I asked for was a standard function that takes a
mangled name in a string and returns a standard string
representation of that type ("std::vector" or whatever.)
The standard would only have to enforce that the function return
a human-readable output.
The actual ABI I'm not too concerned about, quite frankly.
I just want to demangle type name strings! Why did GCC 3.4.0
have to muck up its demangling facility! :-(
--
http://www.it-is-truth.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-06-23 13:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-20 0:23 ABI demangling problems Asfand Yar Qazi
2004-06-22 16:45 ` Ian Lance Taylor
2004-06-22 21:44 ` Asfand Yar Qazi
2004-06-23 12:05 ` Eljay Love-Jensen
2004-06-23 13:29 ` Asfand Yar Qazi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).