We probably feel downhearted if we need to use the debugger to find out what's wrong with our Ada code.
Under those circumstances, we feel even more frustrated if the debugger doesn't work!
For some time now, we've had to code-sign gdb. With Sierra 10.12.0, Apple changed System Integrity Protection in such a way that the default setting prevents gdb from starting a subprocess (i.e. starting the program to be debugged).
At Sierra 10.12.1, Apple reverted the System Integrity Protection change but altered the way that the debugger has to interact with the exec'd program.
I've rebuilt GDB GPL 2016 to include the changes required.
- Download gdb-gpl-2016-sierra.tar.bz2.
- Change directory to the prefix of your GCC installation, e.g. /opt/gcc-6.1.0 or /opt/gnat-gpl-2016/bin; this gdb will work with either compiler.
- Unpack: e.g. tar jxvf ~/Downloads/gdb-gpl-2016-sierra.tar.bz2.
- Code-sign gdb.
- Edit ~/.gdbinit to include the line
set startup-with-shell off
Now you should be good to go!
Edited 19.v.17: only need the csrutil hack on 10.12.0; new binary