打破_NSLockError()来调试...如何? [英] Break on _NSLockError() to debug ... How to?

查看:175
本文介绍了打破_NSLockError()来调试...如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调试期间,控制台总是会吐出一个错误信息:将_NSLockError()中断以调试

During debugging the console always spits me an error message: "Break on _NSLockError() to debug"

我的假设是:在XCode中,我必须出现一定的这个错误发生的时候调试器停止了。

My assumption is: in XCode i have to appear a certain breackpoint, so that the debugger stops at the point where this error occurs.

我如何做到这一点?

推荐答案

1 /从菜单中选择Build - > Build and Debug

1/ From the menu choose Build -> Build and Debug

2 /点击GDB图标 - 你将会切换到调试器控制台

2/ Click the "GDB" icon - you will be switched to the "Debugger console"

3 /按Control + C中断您的二进制文件。您将获得gdb提示符。

3/ Press Control+C to interrupt your binary. You will get the gdb prompt.

4 /键入b _NSLockError,并在设置断点后继续执行。

4/ type in "b _NSLockError" and continue execution after setting the breakpoint.

(gdb) b _NSLockError
Breakpoint 8 at 0x911db1a9
(gdb) c
Continuing.

5 /您可以与GDB交互,就像从控制台运行一样,即您可以Ctrl + C再次查看当前的断点:

5/ you can interact with GDB just as it was running from console, i.e. you can Ctrl+C again and view current breakpoints:

(gdb) info breakpo
Num Type           Disp Enb Address    What
8   breakpoint     keep y   0x911db1a9 <_NSLockError+9>

这篇关于打破_NSLockError()来调试...如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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