During debugging the console always spits me an error message: \"Break on _NSLockError() to debug\"
My assumption is: in XCode i have to appear a certain breackpoint
To do this automatically for your project in XCode:
1/ From the menu choose Build -> Build and Debug
2/ Click the "GDB" icon - you will be switched to the "Debugger console"
3/ Press Control+C to interrupt your binary. You will get the gdb prompt.
4/ type in "b _NSLockError" and continue execution after setting the breakpoint.
(gdb) b _NSLockError
Breakpoint 8 at 0x911db1a9
(gdb) c
Continuing.
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>
Using the Xcode 4 GUI:
As above the debugger will break on the lock which results in a deadlock so you can check the callstack and hopefully determine where the original lock occurred.