[Lldb-commits] [PATCH] D31451: New C++ function name parsing logic
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 25 06:35:55 PST 2018
clayborg added a comment.
In https://reviews.llvm.org/D31451#987537, @labath wrote:
> This code is processing demangled names. Since you say (I could not get my demangler to process it either) the symbol demangles to a multi-megabyte name, we can probably make the cutoff even longer then 1000 bytes.
Problem is we don't have a cutoff when using the libc++ demangler. There is no such features. c++filt just calls into the system (abi::__cxa_demangle(mangled_name, NULL, NULL, NULL)) demangler. We seem to now try our fast demangler, and then fall back to "llvm::itaniumDemangle(...)".
We would switch over to using llvm::itaniumDemangle() all the time and then we could modify this call to have a max length. I believe the code inside llvm::itaniumDemangle is currently an exact local copy of abi::__cxa_demangle(), so it would involve some maintenance as they try to keep in sync with abi::__cxa_demangle() if we modify it...
> OTOH, if we abort demangling of such names in the first place, then this code will not even get used.
The main question is how do we know what we should demangle and what we shouldn't _before_ we try to demangle it. No easy answer to that.
Repository:
rL LLVM
https://reviews.llvm.org/D31451
More information about the lldb-commits
mailing list