Is std.demangle usable?

Stanislav Blinov blinov at loniir.ru
Thu Dec 23 07:42:40 PST 2010


23.12.2010 7:49, Andrej Mitrovic пишет:
> On 12/23/10, Sean Kelly<sean at invisibleduck.org>  wrote:
>> Okay, I'm about to check in this change.  With it, demangle works on the
>> string you supplied provided it's prefixed with "_D8" or "D8".  Simply
>> having "demangle4mainFAAyaZv4testMFZv" isn't a complete symbol.
>>
> Thanks. It works for _D3 as well. But not all of them. I can demangle this:
Do you mean it works with _D3 even for mangled name starting with 
"demangle"? It shouldn't. 3 is a character count of the following name.
> _D3std5stdio4File17LockingTextWriter12__T3putTAyaZ3putMFAyaZv
>>> void std.stdio.File.LockingTextWriter.put!(immutable(char)[]).put(immuta
> ble(char)[])
>
> but not this:
> _D3std9algorithm28__T6reduceVAyaa5_61202b2062Z255__T6reduceTS3std9algorithm221__T3MapS723std10fu1B89DCD92D22D288E31BD77EB8883277
>
> That one's from a trace log. I don't know why this name is mangled
> like that, though.
I beleive the hex part at the end is a hash that is used to mangle very 
long names.


More information about the Digitalmars-d mailing list