Use the Windows API to demangle MSVC symbols on Windows#257
Use the Windows API to demangle MSVC symbols on Windows#257ZivDero wants to merge 4 commits intoencounter:mainfrom
Conversation
|
Thanks for the PR! While a cool idea in theory, I’d much prefer to try to improve the built-in demangler as much as possible. That way, all platforms benefit (including web / decomp.me). |
While I agree in principle, since MSVC mangling isn't documented, that may prove more challenging. Here are the test diff for this PR: Most of these are alright IMO, though the fact that Microsoft's official API can't unmangle the What are your thoughts on this? |
|
The fact that there's already instances where it regresses is unfortunate! And the I just tried out the undname-rs library with and it seems to work with the COM symbols, which is great! But it chokes on the same symbols that |
|
|
Sure, having the fallback seems good, but it looks like |
Right, that's a bug then... Your call, I suppose, whether we want to keep this not-quite-right behavior in. |
0cdde33 to
123b6a5
Compare
123b6a5 to
8487bef
Compare
|
Just weighting in after having done quite a few PC and Xbox 360 titles exported now and dealt a lot function declaration reconstruction for source generation and IDA. The best mangle/demangler is the one inside of the Clang code. Please don't ever make the built-in Windows demangler the default. I have tested the differences of the Clang and MSVC demanglers on many different PC (32 and 64bit) and Xbox 360 titles and found that I can't trust the built-in Windows mangle/demangler for anything reasonably complicated. It is hot garbage and breaks on many of the internal compiler mangled symbols and struggles a lot with strange cases like defining types/lambdas inside of templated functions. https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/MicrosoftMangle.cpp |
This PR adds support to use the Windows API to demangle MSVC symbols on Windows.
Shouldn't affect other platforms.
Resolves #252