如何在Xcode中的_WebThreadLockFromAnyThread上设置符号断点? [英] How do I set a symbolic breakpoint on _WebThreadLockFromAnyThread in Xcode?

查看:285
本文介绍了如何在Xcode中的_WebThreadLockFromAnyThread上设置符号断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 4.3.2和lldb作为我的调试器。

I'm using Xcode 4.3.2 with lldb as my debugger.

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

I have inherited a project that contains code that is calling UIKit from secondary threads, as shown by these log messages:

2012-05-02 21:48:14.603 APPNAME开发[77594:16e0f]空隙
_WebThreadLockFromAnyThread (bool),0x8d5f810:从主线程或Web线程以外的线程获取Web锁定。 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调用的代码从辅助线程,但我仍然偶尔在日志中看到此消息。该应用程序没有崩溃,因此很难确定问题所在。

I have cleaned up most of the code that was making UIKit calls from secondary threads, but I am still occasionally seeing this message in the logs. The app is not crashing, so it's difficult to pinpoint where the problem lies.

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

I'd like to set a breakpoint on _WebThreadLockFromAnyThread, but when I try to set a symbolic breakpoint using:

b _WebThreadLockFromAnyThread

调试器告诉我:


断点集创建--name '_WebThreadLockFromAnyThread' 断点
:12:名称= '_WebThreadLockFromAnyThread',位置= 0
(待定)警告:无法解析断点任何实际
位置

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

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

I've also tried creating the symbolic breakpoint using the UI in the breakpoint navigator, but I'm not sure what to enter for the module. When I leave the module blank, the breakpoint is created but it's still not breaking when the log message appears in the debug console.

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

Can anyone tell me how I can go about adding a breakpoint on _WebThreadLockFromAnyThread, and also how I would determine what the defining module is for this symbol?

推荐答案

请忽略下划线。 b WebThreadLockFromAnyThread在lldb和gdb中都适用于我。现在,这是Xcode 4.6,所以如果您坚持使用旧版本,我认为该版本可能存在4.6版本中没有的问题。

Just leave out the underscore. b WebThreadLockFromAnyThread works for me in both lldb and gdb. Now, this is Xcode 4.6, so if you're stuck on the older version I suppose it's possible that there's an issue in that version not present in 4.6.

这篇关于如何在Xcode中的_WebThreadLockFromAnyThread上设置符号断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆