How do I set a symbolic breakpoint on _WebThreadLockFromAnyThread in Xcode?
ios, iphone, uikit, xcode
Solution
Just leave out the underscore. b WebThreadLockFromAnyThread works for me in both lldb and gdb. Now, this is Xcode 4.6, so if you're stuck on the older version I suppose it's possible that there's an issue in that version not present in 4.6.
Problem
I'm using Xcode 4.3.2 with lldb as my debugger. I have inherited a project that contains code that is calling UIKit from secondary threads, as shown by these log messages: 2012-05-02 21:48:14.603 Appname Dev[77594:16e0f] void _WebThreadLockFromAnyThread(bool), 0x8d5f810: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be called from a secondary thread. I have cleaned up most of the code that was making UIKit calls from secondary threads, but I am still occasionally seeing this message in the logs. The app is not crashing, so it's difficult to pinpoint where the problem lies. I'd like to set a breakpoint on `_WebThreadLockFromAnyThread`, but when I try to set a symbolic breakpoint using: ``` b _WebThreadLockFromAnyThread ``` the debugger tells me: breakpoint set --name '_WebThreadLockFromAnyThread' Breakpoint created: 12: name = '_WebThreadLockFromAnyThread', locations = 0 (pending) WARNING: Unable to resolve breakpoint to any actual locations. I've also tried creating the symbolic breakpoint using the UI in the breakpoint navigator, but I'm not sure what to enter for the module. When I leave the module blank, the breakpoint is created but it's still not breaking when the log message appears in the debug console. Can anyone tell me how I can go about adding a breakpoint on `_WebThreadLockFromAnyThread`, and also how I would determine what the defining module is for this symbol?