D demangling filter tool?

Robert Clipsham robert at octarineparrot.com
Thu Jun 23 05:26:05 PDT 2011


On 23/06/2011 12:54, Michel Fortin wrote:
>>> https://gist.github.com/1042363
>>>
>>> David
>>
>> Doesn't seem to work for me with the following:
>>
>> Undefined symbols for architecture i386:
>> "__Dmain", referenced from:
>> _D2rt6dmain24mainUiPPaZi7runMainMFZv in libphobos2.a(dmain2_2fa_1a5.o)
>> ld: symbol(s) not found for architecture i386
>> collect2: ld returned 1 exit status
>> --- errorlevel 1
>>
>> Unless I manually pull out the symbols and send them through it.
>
> Works for me. Note: make sure you're redirecting stderr to ddemangle's
> stdin using 2>&1.
>
> $ dmd u.d 2>&1 | ./ddemangle
> Undefined symbols for architecture i386:
> "__Dmain", referenced from:
> extern (C) int rt.dmain2.main(int, char**).void runMain() in
> libphobos2.a(dmain2_2f9_1a5.o)
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> --- errorlevel 1
>
>

Shouldn't it also demangle __Dmain? In backtraces that's normally 
demangled as D main(). Also thanks, that's got it working :)

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list