[Lldb-commits] [PATCH] [IRForTarget] Strenghten handling of alternate mangling.

Enrico Granata egranata at apple.com
Mon Apr 6 15:40:05 PDT 2015


> On Apr 6, 2015, at 3:32 PM, Sean Callanan <scallanan at apple.com> wrote:
> 
> I like this; we could have the CXXLanguageRuntime return a list of “candidate” remangled names if you can’t find a given one, and then try those.
> The function would have the signature
> 
> size_t
> CXXLanguageRuntime::GetAlternateManglings(ConstString mangled_name, std::vector<ConstString> &alternate_names);
> 
> What do you folks think?
> 
> Sean
> 
> Siva, please move your logic (and the existing logic) into that function, which should ideally just take a str
> 
>> On Apr 6, 2015, at 3:15 PM, Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
>> 
>> Is it possible to do away with the hardcoded mangled name?  I really dislike seeing this kind of thing.  Not only because it doesn't work with all ABIs, but just in general it's very gross for the debugger to have exceptions for specific mangled names.  Why is this necessary, and is there any way to get rid of it?
>> 
>> If it is necessary, can we at least move it to somewhere more appropriate like the Mangled class and provide some kind of generic method like Mangled::GetAlternateMangling()?  
>> 
>> On Mon, Apr 6, 2015 at 3:10 PM Greg Clayton <clayborg at gmail.com <mailto:clayborg at gmail.com>> wrote:
>> I'll OK this on the condition that Sean Callanan OKs this. Sean?
>> 
>> 
>> http://reviews.llvm.org/D8846 <http://reviews.llvm.org/D8846>
>> 
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/ <http://reviews.llvm.org/settings/panel/emailpreferences/>
>> 
>> 
>> 
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu <mailto:lldb-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits <http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits>
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


FWIW, we already have some similar provisions for detangled name in CPPLanguageRuntime

It’s called CPPRuntimeEquivalents, and according to SVN, I introduced it in 2012:

Author: enrico
Date: Thu Feb  2 19:41:25 2012
New Revision: 149661

URL: http://llvm.org/viewvc/llvm-project?rev=149661&view=rev <http://llvm.org/viewvc/llvm-project?rev=149661&view=rev>
Log:
Adding support for an "equivalents map". This can be useful when compilers emit multiple, different names for the same actual type. In such scenarios, one of the type names can actually be found during a type lookup, while the others are just aliases. This can cause issues when trying to work with these aliased names and being unable to resolve them to an actual type (e.g. getting an SBType for the aliased name).
Currently, no code is using this feature, since we can hopefully rely on the new template support in SBType to get the same stuff done, but the support is there just in case it turns out to be useful for some future need.

Modified:
    lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
    lldb/trunk/source/Target/CPPLanguageRuntime.cpp


Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150406/6446c3cb/attachment.html>


More information about the lldb-commits mailing list