[cxx-abi-dev] __cxa_demangle of type manglings
Jason Merrill
jason at redhat.com
Tue Jan 11 23:15:11 UTC 2005
On Mon, 10 Jan 2005 17:20:38 -0800 (PST), Dennis Handly <dhandly at cup.hp.com> wrote:
>>From: Jason Merrill <jason at redhat.com>
>>The ABI specification says that the argument to __cxa_demangle can be
>>'either an external name, i.e. with a "_Z" prefix, or an internal NTBS
>>mangling, e.g. of a type for type_info', and later that
>
> We had a customer that insisted that __cxa_demangle work for type_info
> so their code would be portable.
So your __cxa_demangle always interprets an argument as a type mangling if
possible? That's the behavior I'm advocating.
>>and that we should add another way to specify that the argument is an
>>external name, probably via another entry point.
>
> There is no need to have another entry. If it doesn't start with "_Z"
> it is a type or a non-mangled object or function name.
Yes, but which? Type or non-mangled name? That's the ambiguity, and I
think the user should be able to control how it is resolved.
> One other special thing I did for c++filt, where I added advanced AI
> technology, if you have a file, it only demangles tokens if it starts with
> "_Z". If you provide the string on the command line, it assumes you want
> to demangle a type_info.
>
> (This seems to be what gnu c++filt (3.2) does.)
Yep.
Jason
More information about the cxx-abi-dev
mailing list