[lldb-dev] ObjC decl string checks in Expr Eval?
Greg Clayton
gclayton at apple.com
Fri Mar 7 09:21:57 PST 2014
We would be happy to accept a patch that disables these ObjC specific checks if ObjC it isn't enabled for a platform or process.
On Mar 7, 2014, at 2:00 AM, Colin Riley <colin at codeplay.com> wrote:
> Yeah, I saw there are also checks in SymbolFileDWARF.cpp for "id", "Class" and "SEL" but at least those are behind ObjC language checks.
>
> The platform we're running on doesn't support ObjC. From what I can see these checks in ClangASTSource do no language checking so are applied to everything regardless.
>
> Colin
>
> On 06/03/2014 23:07, Greg Clayton wrote:
>> What Jim said was true, but I believe it goes a bit further. If we are asked to lookup "id" or "Class", we will find something in the DWARF which will cause a type to be created which isn't compatible with the internally defined "id" and "Class" that the compiler knows about for Objective C. Then this causes problems evaluating expressions...
>>
>> What platform are you running your expressions on? We might be able to disable objective C for platforms that don't support it (ObjC should be enabled for anything that is "*-apple-macosx" or "*-apple-ios").
>>
>> Greg
>>
>> On Mar 6, 2014, at 8:41 AM, Colin Riley <colin at codeplay.com> wrote:
>>
>>> Hey folks,
>>>
>>> I'm interested in the following code in ClangASTSource.cpp - ClangASTSource::FindExternalVisibleDecls(), around line 605.
>>>
>>> ...
>>> static ConstString id_name("id");
>>> static ConstString Class_name("Class");
>>>
>>> if (name == id_name || name == Class_name)
>>> return;
>>> ...
>>>
>>> Is this a legacy bit of ObjC early exit magic? I've been wondering why expression evaluation was failing only ever on variables called 'id' ;) I don't have the ability to validate implications of removal of the code on ObjC. Any opinions on whether this is actually still needed?
>>>
>>> Colin
>>>
>>> --
>>> Colin Riley
>>>
>>> Codeplay Software Ltd
>>> 45 York Place, Edinburgh, EH1 3HP
>>> Phone: +44 131 466 0503
>>> Fax: +44 131 557 6600
>>> Website: http://www.codeplay.com
>>>
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>
> --
> Colin Riley
>
> Codeplay Software Ltd
> 45 York Place, Edinburgh, EH1 3HP
> Phone: +44 131 466 0503
> Fax: +44 131 557 6600
> Website: http://www.codeplay.com
> Twitter: @codeplaysoft
>
> This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
> As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
> Company registered in England and Wales, number: 04567874
> Registered office: 81 Linkfield Street, Redhill RH1 6BY
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list