This is an archive of the discontinued LLVM Phabricator instance.

Proper handling of Itanium mangled names in LLVMSymbolizer on Windows
ClosedPublic

Authored by eugene on Mar 7 2018, 1:29 AM.

Details

Summary

Currently on Windows (_MSC_VER) LLVMSymbolizer tries only Microsoft mangling, it makes it difficult to use for crossplat tools.
This fix just explicitly uses itaniumDemangle instead of __cxa_demangle. LLDB on Windows does the same.

Diff Detail

Repository
rL LLVM

Event Timeline

eugene created this revision.Mar 7 2018, 1:29 AM
rnk added a subscriber: ruiu.Mar 7 2018, 10:28 AM
rnk added inline comments.
lib/DebugInfo/Symbolize/Symbolize.cpp
477 ↗(On Diff #137335)

I think we should use itaniumDemangle everywhere so that we have consistent behavior across platforms. At some point, we may be able to add @ruiu's MS demangler below so that we can demangle MS C++ symbols on Linux.

eugene updated this revision to Diff 137450.Mar 7 2018, 11:50 AM
eugene edited the summary of this revision. (Show Details)

Always using itaniumDemangle

eugene marked an inline comment as done.Mar 7 2018, 11:50 AM
rnk accepted this revision.Mar 7 2018, 11:57 AM

lgtm

This revision is now accepted and ready to land.Mar 7 2018, 11:57 AM
This revision was automatically updated to reflect the committed changes.