Note: these instructions are for pre-Sierra MacOS. Sierra Users: see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.
If you are getting this in gdb on OSX while trying to run a program:
Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
- Open Keychain Access