lldb-114: initial process state wasn't stopped

Here is what i get trying to debug anything:

~/Projects/ULTIMATE (git::master)$ /Applications/Xcode.app/Contents/Developer/usr/bin/lldb
(lldb) file /Users/zajac/Projects/ULTIMATE/system/DerivedData/debug-42b46838/Build/Products/macos-target-debug/macos-target
Current executable set to '/Users/zajac/Projects/ULTIMATE/system/DerivedData/debug-42b46838/Build/Products/macos-target-debug/macos-target' (x86_64).
(lldb) r
Process 26225 launched: '/Users/zajac/Projects/ULTIMATE/system/DerivedData/debug-42b46838/Build/Products/macos-target-debug/macos-target' (x86_64)
error: initial process state wasn't stopped: exited

But remote-debug on device works fine. Wierd.

lldb-114 from Xcode 4.4
Mac OS X Lion 10.7.3


I have the same problem with the latest HEAD from svn. I asked yesterday about the python bindings, but the problem is not from that. I have the lldb_codesign certificate with "always trust" for code signing.



Hi all,

I have some more information. It seems the problem may be with debugserver, somewhere.

When running a program with Apple's latest lldb (from the command line tools package, for Xcode 4.3), I get:

This does look like a problem with debugserver unable to get task_for_pid rights, which either means your code signing cert is not trusted by you or it has lost the magic necessary to be recognized by the system. Make sure your lldb_codesign cert is still trusted (in Keychain Access it should have a blue +, not a red x... But this process seems a little flakey. Sometimes when you restart magically the code signing magically starts to be recognized. Sometimes you have to delete your code signing cert (remember to remove it from the login & system keychains) then re-make it following the instructions in the doc/code-signing.txt.


What do things look like on the debugserver side? Run debugserver like so:

debugserver -gv -ldnb.log <host>:<port> <program>

I've attached what I get here. It looks like task_for_pid() is actually succeeding, but at some point the port becomes nulled out--at least, that's what happens to me.


dnb.log (5.26 KB)

Hi Jim,

My problem was with the certificate. I had the blue +, but re-doing everything fixed it.

Thanks for the help,


Yeah, this part of the setup is a bit black arts... But I generally find that if I delete all the certs and remake them (at least if I do it on a full moon and wearing my special hat) it generally gets back to working again. Sometimes it's also necessary to log out & log back in again.