如何“在malloc_error_break中设置断点以进行调试” [英] How to "set a breakpoint in malloc_error_break to debug"

查看:4674
本文介绍了如何“在malloc_error_break中设置断点以进行调试”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了很多这样的控制台输出而没有我的应用程序崩溃:

I'm getting lots of console outputs like this without my application crashing:


malloc: *对象0xc6a3970的错误:被释放的指针不是
已分配*
在malloc_error_break中设置断点以进行调试

malloc: * error for object 0xc6a3970: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug

我如何找到哪个对象或变量受到影响?

How can I find out which object or variable is affected?

我尝试设置这样的符号断点,但它永远不会停止:

I tried setting a symbolic breakpoint like this but it never halts:

推荐答案

通过打开断点导航器(View-> Navigators-> Show Breakpoint Navigator或⌘7​​),单击左下角的加号按钮,然后选择Add Symbolic Breakpoint,在malloc_error_break()上设置断点。 。在弹出的弹出窗口中,在符号字段中输入 malloc_error_break ,然后单击完成。

Set a breakpoint on malloc_error_break() by opening the Breakpoint Navigator (View->Navigators->Show Breakpoint Navigator or ⌘7), clicking the plus button in the lower left corner, and selecting "Add Symbolic Breakpoint". In the popup that comes up, enter malloc_error_break in the Symbol field, then click Done.

编辑:openfrog已添加截图并表示他已经尝试了这些步骤而没有成功之后我发布了我的答案。有了这个编辑,我不知道该说些什么。我没有看到自己无法工作,事实上我总是在malloc_error_break设置上保留一个断点。

openfrog added a screenshot and indicated that he's already tried these steps without success after I posted my answer. With that edit, I'm not sure what to say. I haven't seen that fail to work myself, and indeed I always keep a breakpoint on malloc_error_break set.

这篇关于如何“在malloc_error_break中设置断点以进行调试”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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