开发者

How can I tell the debugger to break on auto_refcount_underflow_error

I am writing my first OS X (10.6) Application with Xcode 4 and encounter this message:

malloc: reference count underflow for 0x2000b9540, break on auto_refcount_underflow_error to debug

I understand that I have a problem with my memory management, but I would like to narrow the point. So I hope that I can tell the debugger to break at the line of code where this error occurs. But I do not see any option to tell the debugger "break on auto_refcount_underflow_error". But I hope it is po开发者_运维知识库ssible. Can you please tell me how? Just in case that it is important for this: The error occurs in a GCD thread.

Best regards & thank you very much Arno


Use the comand line of GDB. In Xcode 4, in the console window next to the (gdb) prompt, type

br auto_refcount_underflow_error

br is the break command and it sets a breakpoint.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜