gpt4 book ai didi

objective-c - lldb 无法打印 "error: reference to ' id' 的变量值不明确”

转载 作者:IT老高 更新时间:2023-10-28 11:38:47 39 4
gpt4 key购买 nike

自从我更新到 xcode 4.3 并让它将我的调试器切换到 lldb 后,任何打印成员变量的请求都会失败并显示以下错误消息:

(lldb) print request
error: error: reference to 'id' is ambiguous
note: candidate found by name lookup is 'id'
note: candidate found by name lookup is 'id'
error: 1 errors parsing expression

'self' 没问题:

(lldb) print self
(LoginViewController *) $6 = 0x1cd54d50

并且其他形式的打印成员变量也失败了:

(lldb) print self.request
error: property 'request' not found on object of type 'LoginViewController *'; did you mean to access ivar 'request'?
error: 1 errors parsing expression
(lldb) print self->request
error: error: reference to 'id' is ambiguous
note: candidate found by name lookup is 'id'
note: candidate found by name lookup is 'id'
error: 1 errors parsing expression

其他一切似乎都运行良好。 Xcode 的变量 window 可以正确检索值。我尝试了一个干净的构建并删除 ~/Library/Developer/Xcode/DerivedData/。谷歌搜索没有发现任何其他相同问题的实例。

我在 Apple 的开发论坛上找到了一个帖子,但没有解决方案:

https://devforums.apple.com/message/623694

我已将此作为错误 ID#11029004 报告给 Apple。

最佳答案

我找到了一种解决方法:

使用“Product”菜单下的“Edit scheme”,在左侧栏中选择“Run”,“Info”选项卡,将 Debugger 更改为 gdb(这不适用于 xcode 5,它不再有 gdb )。

显然,Apple 认为他们已经在 xcode 4.3.1 中修复了这个错误,但它仍然会发生。我提交了一些他们要求的额外调试信息,所以我希望它会在下一个版本的 xcode 中得到修复。它在 4.3.2 中仍然失败。见 https://devforums.apple.com/message/623694获取来自 Apple 的更新。

更新

我尝试了各种我遇到问题的案例,它们似乎都可以在 Xcode 4.4.1 中正常使用 lldb - 因此,如果您遇到此问题,我强烈建议您升级。

关于objective-c - lldb 无法打印 "error: reference to ' id' 的变量值不明确”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9515630/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com