Trying to use gdb on OSX El Capitan gave me following message.
You need to codesign gdb with a custom certificate.
- Open Keychain Access
- In the menu, go to Certificate Assistant -> Create Certificate
- Choose an appropriate name like gdb-cert, set Identity Type to Self Signed Root, set Certificate Type to Codesign, and check Let me override defaults
- Optional: extend duration
- Click continue until specifying location for the certificate, choose System
- In System, click on gdb-cert, choose Get Info, go to Trust and set Code Signing to Always Trust
- Restart taskgated
sudo kill -9 (which gdb)