My app runs fine but gdb fails to debug it with the following error
(gdb) run Starting program: /path/to/app Unable to find Mach task port for process-id 83
I needed this command to make it work on El Capitan:
sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/gdb-cert.cer