How to set a breakpoint on _NSLockError ()

I am trying to debug multiple threads.

 *** -[NSLock lock]: deadlock (<NSLock: 0xc388ab0> '(null)')
 *** Break on _NSLockError() to debug.

      

How can I debug this?

+2


a source to share


1 answer


If you are using the Xcode debugger (which uses gdb under the hood), pause the application and in the console enter:

b _NSLockError

      



The debugger will then stop the application when _NSLockError occurs, and you can check the backtrace.

+5


a source







All Articles