Comment #0 by destructionator — 2013-11-23T19:47:24Z
I talked about it in detail here:
http://forum.dlang.org/thread/[email protected]?page=2#post-vcafquufzkrpuaqktqbr:40forum.dlang.org
shorter version:
I think the reason that "_D16TypeInfo_HAyayAa6__initZ" couldn't
get automatically demangled is because it is a special name that
doesn't actually follow the ABI spec. It's compiler generated
info whose mangle looks kinda like a function, but it lacks the
calling convention or return value that core.demangle requires to
be there to consider a valid name.
[...]
So that crazy name "TypeInfo_HAyayAa" actually follows the very
same pattern. This might be the one time outside eyeball
debugging when knowing your mangles by hand is actually useful!
On the other hand, perhaps it'd be a good idea to add recognition
of this pattern to core.demangle, so it can print out the much
prettier
typeid(immutable char[][immutable(char)[]])
cuz that's how you'd likely refer to it in code anyway.
* * *
The underlying bug that produces the linker error in the first place ought to be fixed too (though over the years, I've been unable to produce a reliable test case! it seems to come and go at random, I think presence of other code that uses it or compile command line order may affect it, but have never isolated the problem).
Anyway, at least adding support for the name here will help future people debug it without having to know all the mangling rules.
Comment #1 by robert.schadek — 2024-12-07T13:33:04Z