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, Apple have 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).
To add to the problems, Apple have 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.gz.
- Unpack it (giving gdb).
- Copy gdb to $prefix/bin (e.g. /opt/gnat-gpl-2016/bin, /opt/gcc-6.1.0/bin; this gdb will work with either compiler).
- Code-sign gdb (don't bother to restart the computer yet).
- Reboot your system into recovery mode: at the bong, keep Command-R pressed until the Apple logo appears;
- Select Terminal from the Utilities menu;
csrutil enable --without debug;
- Edit ~/.gdbinit to include the line
set startup-with-shell off
Now you should be good to go! (at any rate, with Sierra 10.12.3, Darwin 16.4.0).