加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – 如何在Xcode中的_WebThreadLockFromAnyThread上设置符

发布时间:2020-12-14 19:58:56 所属栏目:百科 来源:网络整理
导读:我正在使用 Xcode 4.3.2和lldb作为我的调试器. 我继承了一个项目,其中包含从辅助线程调用UIKit的代码,如这些日志消息所示: 2012-05-02 21:48:14.603 Appname Dev[77594:16e0f] void _WebThreadLockFromAnyThread(bool),0x8d5f810: Obtaining the web lock f
我正在使用 Xcode 4.3.2和lldb作为我的调试器.

我继承了一个项目,其中包含从辅助线程调用UIKit的代码,如这些日志消息所示:

2012-05-02 21:48:14.603 Appname Dev[77594:16e0f] void
_WebThreadLockFromAnyThread(bool),0x8d5f810: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit
should not be called from a secondary thread.

我已经清理了从辅助线程进行UIKit调用的大部分代码,但我偶尔会在日志中看到这条消息.该应用程序没有崩溃,因此很难确定问题所在.

我想在_WebThreadLockFromAnyThread上设置断点,但是当我尝试使用以下方法设置符号断点时:

b _WebThreadLockFromAnyThread

调试器告诉我:

breakpoint set –name ‘_WebThreadLockFromAnyThread’ Breakpoint
created: 12: name = ‘_WebThreadLockFromAnyThread’,locations = 0
(pending) WARNING: Unable to resolve breakpoint to any actual
locations.

我也尝试使用断点导航器中的UI创建符号断点,但我不确定要为模块输入什么.当我将模块留空时,会创建断点,但在调试控制台中显示日志消息时它仍然没有中断.

任何人都可以告诉我如何在_WebThreadLockFromAnyThread上添加断点,以及如何确定该符号的定义模块是什么?

解决方法

只是省略下划线. b WebThreadLockFromAnyThread在lldb和gdb中都适用于我.现在,这是Xcode 4.6,所以如果你坚持使用旧版本,我想可能在4.6版本中没有出现该版本的问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读