-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demangle RTTI class names #9
Comments
Thanks for the report. I think the undname also can't demangle this (but there's no reason not to do better, of course):
For Itanium symbols, we're able to demangle both name of the struct and the contents:
This suggests we should support this for the Microsoft ABI too. |
One problem is that this makes it a bit hard to detect a mangled string. At the moment, we can look for "?" as prefix on Win and for "_Z" on Itanium. With this, the prefix on Win can be ".?..." for a tag type ( |
With ad8745b (not production quality) applied locally:
|
Upstream bit: https://reviews.llvm.org/D67851 |
Thank you for working on this |
New: - [ms] demangle rtti descriptor names Ran: cp ~/src/llvm-project/llvm/include/llvm/Demangle/*.h third_party/llvm/include/llvm/Demangle/ cp ~/src/llvm-project/llvm/lib/Demangle/*.cpp third_party/llvm/lib/Demangle/ cp ~/src/llvm-project/llvm/LICENSE.TXT third_party/llvm/LICENSE.txt Related to #9.
Trunk now demangles rtti descriptor names when you pass them directly:
Adding it in streaming mode ( I could make it so that on demangling fail, we consume just one char instead or something. Not supporting this in streaming mode at all isn't super unreasonable either imho, since that's what we do for itanium type manglings ("Pi"). But eventually I'll probably want to do the smarter backtracking -- it should fire rarely enough that it shouldn't affect perf much. |
RTTI class names that start with .?AV or .?AU (class/struct) are not demangled. This can be fixed by stripping the symbol prefix for RTTI and replacing it with the C++ class prefix.
Example:
.?AVCNetMidLayer@@
->??0CNetMidLayer@@QAE@XZ
From:
https://reverseengineering.stackexchange.com/questions/20516/how-can-i-demangle-the-name-in-an-rtti-type-descriptor
and
https://github.com/REhints/HexRaysCodeXplorer/blob/5be89aa1d32eeaefb099b838ee5622200eb8a2e9/src/HexRaysCodeXplorer/ObjectExplorer.h#L80
The text was updated successfully, but these errors were encountered: