About demangling
Dan
dbdavidson at yahoo.com
Thu Nov 1 07:16:25 PDT 2012
On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne
Petersen wrote:
> On 11-10-2012 22:56, Sean Kelly wrote:
>> On Oct 11, 2012, at 6:17 AM, Lubos Pintes
>> <lubos.pintes at gmail.com> wrote:
>>
>>> Hi,
>>> Can someone point me to some source with information about
>>> name demangling when compiling some D program and the famous
>>> linker error 42 appears?
>>
>> Filter the symbol names through core.demangle.
>>
>
> We even have a tool for that:
> https://github.com/D-Programming-Language/tools/blob/master/ddemangle.d
Does this work and if so how? I've seen a thread about the
demangling tool not working on types, just functions. The comment
at top of this file says
"Replaces *all* occurrences of mangled D symbols in the input..."
so I assume it deals with types? The help says: 'If <inputfile>
is a single dash '-', standard input is read.'
I've tried:
$ echo "this &
_D56TypeInfo_xS8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ
unq &
_D55TypeInfo_S8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ"
> ./goo.txt
$ ./ddmangle ./goo.txt
which just hangs, and this - which does not demangle:
$ echo "this &
_D56TypeInfo_xS8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ
unq &
_D55TypeInfo_S8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ"
| ./ddmangle
this &
_D56TypeInfo_xS8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ
unq &
_D55TypeInfo_S8plusauri6bsheet13balance_sheet12BalanceSheet6__initZ
What is the correct way to do this?
Thanks
Dan
More information about the Digitalmars-d-learn
mailing list