www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - demangling (Ubuntu 64bit 12.04, dmd 64bit 2.060)

reply "Carl Sturtivant" <sturtivant gmail.com> writes:
I've been looking at the objects etcetera produced by dmd, and 
using D's function demangle in std.demangle to decrypt some of 
the symbols found in such objects by nm.

http://sourceware.org/binutils/docs-2.22/binutils/nm.html

While demangle does produce a demangled version of some symbols, 
it does not in other cases where they nevertheless look as if 
they may be mangled names of some kind. I considered that perhaps 
they are C++ mangled names, but have been unable to get nm to 
unmangle them, even though it nominally knows about C++ name 
mangling.

Is there a better analog of demangle I can use to translate back 
some of these more intractable mangled names? I tried the one in 
core.demangle but it did no better. Or is there somewhere I could 
determine the demangling rules and implement them for myself? Any 
suggestions will be gratefully received.

Here are some examples that are not demangled by 
std.demangle.demangle :

_D13libd_demangle12__ModuleInfoZ
_D15TypeInfo_Struct6__vtblZ
_D3std5stdio12__ModuleInfoZ
_D3std6traits15__T8DemangleTkZ8Demangle6__initZ
_D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ
Aug 20 2012
next sibling parent reply "Carl Sturtivant" <sturtivant gmail.com> writes:
Hmmn, that's odd, now Sean Kelly's reply has vanished from this 
thread, along with my reply to it, but my original post has 
reappeared. (Previously that vanished when Sean replied.)
Aug 20 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-08-21 04:30, Carl Sturtivant wrote:
 Hmmn, that's odd, now Sean Kelly's reply has vanished from this thread,
 along with my reply to it, but my original post has reappeared.
 (Previously that vanished when Sean replied.)

I'm seeing both of your posts in the newsgroup. Although they don't appear in the web front end. -- /Jacob Carlborg
Aug 20 2012
prev sibling parent "Carl Sturtivant" <sturtivant gmail.com> writes:
On Tuesday, 21 August 2012 at 06:52:56 UTC, Jacob Carlborg wrote:
 On 2012-08-21 04:30, Carl Sturtivant wrote:
 Hmmn, that's odd, now Sean Kelly's reply has vanished from 
 this thread,
 along with my reply to it, but my original post has reappeared.
 (Previously that vanished when Sean replied.)

I'm seeing both of your posts in the newsgroup. Although they don't appear in the web front end.

Hmmn, now the posts all appear but in two disjoint threads, the ordered union of which is how they should appear. Never mind: I got a good answer! (In the other half thread.)
Aug 21 2012