open /Applications/Utilities/Keychain\ Access.app/
打開 鑰匙串訪問




繼續繼續




創建完畢。
Now that we have a certificate, we need to use it to sign GDB. First, we'll restart the taskgatedprocess to make sure it picks up the new certificate. Quit Keychain Access (you must quit Keychain Access!) and return to the Terminal for these final commands.
Find the taskgated process.
The first number in the above output is the PID. Use this to kill the process (it will immediately restart itself). 我 kill 掉 taskgated 之后,它沒有自動重啟,所以建議創建完證書之后,重啟下系統,然后再執行:codesign -s gdb-cert $(which gdb)
Now you can finally code sign GDB.
$ codesign -s gdb-cert $(which gdb)
Now you should be all set! The OS X Keychain may ask for your password the first time you attempt to debug a program, but it should work!
