[lldb-dev] LLDB Expression Parser

Alex Pepper apepper at blueshiftinc.com
Wed Jul 9 10:21:15 PDT 2014


>
> One immediate problem I see with this symbol is that it is a mangled 
> name with angle brackets (<>) in it.  I don’t believe this is proper 
> mangling.
>
> What I think is happening here is that the debug information is 
> telling you that the type of something is char_traits<char> but 
> treating that as a normal type instead of a templated type.  Then 
> we’ll report a normal type with a name containing angle brackets to 
> Clang, and it’ll produce bogus mangled names as you see.
>
This is what I see happening in the clang mangling code.  In the clang 
AST parsing when it attempts to do the mangled name substitution it is 
failing when checking to see if it is a 
basic_string<char,char_traits<char>,allocator<char>>. It is failing when 
checking to see if char_traits<char> is a char specialization of 
char_traits.  In this check if fails the dyn_cast to 
ClassTemplateSpecializationDecl which indicates to me that is doesn't 
think it is a specialization of a template class.

> One way you can see what types are being reported for things is by 
> enabling the expression log:
>
> (lldb) log enable -f /tmp/lldb.expr.log.txt lldb expr
> (lldb) expr /your expression/
> /
> /
I will take a look at the logs, and thanks for the pointers.

- Alex


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140709/c29d0a2c/attachment.html>


More information about the lldb-dev mailing list