I’m a bit confused as to the steps involved for code signing the gdb 
application before using it.

The notes for gdb says:
-----------------------------------
gdb has the following notes:
  You will need to make sure 
/System/Library/LaunchDaemons/com.apple.taskgated.plist has the '-p' option, 
e.g.
              <key>ProgramArguments</key>
              <array>
                      <string>/usr/libexec/taskgated</string>
                      <string>-sp</string>
              </array>
  
  Due to kernel caching, you usually need to restart Mac OS X for this option 
to effect.
------------------------------------

Okay, so far so good. I disabled SIP, restarted, made those changes and then 
reenabled SIP and restarted. But I heard that the Darwin kernel needs the gdb 
executable to be code signed in order to have permissions to control other 
processes. 

I found instructions for how to do so here: 

https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gnat_ugn_unw/Codesigning-the-Debugger.html
 
<https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gnat_ugn_unw/Codesigning-the-Debugger.html>

But I have not yet gone ahead and done so since I am confused about the 
<gnat_install_prefix> argument in the last step. First of all, is this 
referring to the gcc ada compiler…and if so, is it already installed or do I 
need to go and install this thing? I was under the impression all dependencies 
for gdb were installed before gdb itself was installed so shouldn't this 
prerequisite exist somewhere on my system, I just don’t know where?

Any clarifications are appreciated…thanks.




Reply via email to