July 17, 2018
Hi,
I built a simple program with dmd a.d and tried to observe symbols with nm --demangle=dlang ./a. However, I can observe that only part of the symbols (e.g., std.stdio.File.size()) are demangled, while others remain in their original name (e.g., _D3std5stdio4File8opAssignMFNfSQBdQBcQzZv). Is this a bug of nm? Moreover, what is the suggested way to demangle symbol names in dlang?

Thanks
July 17, 2018
On Tuesday, 17 July 2018 at 15:39:39 UTC, Zheng (Vic) Luo wrote:
> Hi,
> I built a simple program with dmd a.d and tried to observe symbols with nm --demangle=dlang ./a. However, I can observe that only part of the symbols (e.g., std.stdio.File.size()) are demangled, while others remain in their original name (e.g., _D3std5stdio4File8opAssignMFNfSQBdQBcQzZv). Is this a bug of nm?

It probably doesn't support the new back-referencing yet.

https://dlang.org/changelog/2.077.0.html#mangleBackref
https://dlang.org/blog/2017/12/20/ds-newfangled-name-mangling/

> Moreover, what is the suggested way to demangle symbol names in dlang?

ddemangle (it should be part of your distribution or release archive)