It works when I change to sudo gdb executableFileName
! :)
In Snow Leopard and later Mac OS versions, it isn't enough to codesign the gdb
executable.
You have to follow this guide to make it work: http://www.opensource.apple.com/source/lldb/lldb-69/docs/code-signing.txt
The guide explains how to do it for lldb
, but the process is exactly the same for gdb
.
You need to create a certificate and sign gdb:
Finally you can sign gdb:
sudo codesign -s gdb-cert /usr/local/bin/ggdb
sudo ggdb ./myprog
The problem is that you are not logged in as a root user (which you don't want). You need to create a certificate for gdb to be allowed access. Follow this tutorial and you should be good to go...
http://sourceware.org/gdb/wiki/BuildingOnDarwin
If all else fails, just use: sudo gdb executableFileName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With