I had the same problem, it wouldn't run, except as root/sudo, which meant I couldn't use it with eclipse, which meant I lost 5 working hours debugging the problem. Here are my results.
Firstly, gdb generated a similar error message when executed under my user account.
Unable to find Mach task port for process-id 4667: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
I tried code signing it by creating a certificate using Keychain, then marking the certificate as trusted for code signing. Then applying it to the executable from the command line.
codesign -s gdb-cert /usr/local/Cellar/gdb/7.6.1/bin/gdb
codesign --verify --verbose /usr/local/Cellar/gdb/7.6.1/bin/gdb
codesign -d --verbose /usr/local/Cellar/gdb/7.6.1/bin/gdb
That didn’t work
I tried adding my user account to the procview, procmod, and _developer groups (probably insecure, but I only deploy my code to github, and don't use the machine for personal use, so I can live with that)
sudo dscl . append /Groups/procmod GroupMembership bryanhunt
sudo dscl . append /Groups/procview GroupMembership bryanhunt
sudo dscl . append /Groups/_developer GroupMembership bryanhunt
That didn't work
Finally, I tried changing the executable's group and group sticky bit.
sudo chgrp procmod /usr/local/Cellar/gdb/7.6.1/bin/gdb
sudo chmod g+s /usr/local/Cellar/gdb/7.6.1/bin/gdb
That worked