lldb奇怪的错误

Koe*_*oen 21 lldb xcode4.3

我正在使用xCode 4.3.1,并且一旦我想使用lldb,我几乎没有得到任何调试信息,但得到以下结果,在一个简单的NSMutableDictionary属性上:

(lldb) po _keywordCache
error: instance method 'delegate' has incompatible result types in different translation units ('objc_object *' vs. 'id')
error: instance method 'delegate' has incompatible result types in different translation units ('objc_object *' vs. 'id')
note: instance method 'delegate' also declared here
note: declared here with type 'id'
note: instance method 'delegate' also declared here
note: declared here with type 'id'
error: 2 errors parsing expression
Run Code Online (Sandbox Code Playgroud)

切换到gdb始终会给出正确的结果.
有人有想法吗?

dan*_*ass 8

在我的案例中问题的根源是这里讨论的属性,"委托"在实例变量和属性声明中被声明为一个微妙的不同类型.在我的例子中,实例变量类型是id和属性声明id<SomeProtocol>.

我将向Apple报告这是一个错误,因为它不应该导致检查变量失败.修复方法是确保实例变量和属性声明将"委托"描述为完全相同的类型.希望这可以帮助!