This arose from How to install gdb (debugger) in Mac OSX El Capitan?.
I have macports working under el capitan no problem and have installed the gdb port but I can\
I just settled this problem by using the following command.
sudo dseditgroup -o edit -a yourusername -t user procmod
Which adds you to group procmod
.
It's just because only users in procmod
can use function task_for_pid
, and you can find that the own group of /opt/local/bin/ggdb
is procmod
.
I installed MacPorts gcc9
(gcc-9.2.0) on an older iMac (10.11.6 El Capitan), and recently needed to install the gdb
port (gdb-9.1.0); predictably encountering the same code-signing / permission issue.
There's a list of instructions on github that worked perfectly for me, simply replacing: /usr/local/bin/gdb
with: /opt/local/bin/ggdb
. Since such snippets on github may be ephemeral, so I'll paste it here:
gdbc
)
always trust
killall taskgated
codesign -fs gdbc /usr/local/bin/gdb
in terminal: this asks for the root passwordDone!