This is how I easily fixed the issue. [Update: based on feedback received and yet to be verified, it seems that this solution works with macOS Sierra 10.12 but not with macOS Sierra 10.12.2]
See video instructions here
- Quit gdb
- Using your text editor e.g. Sublime Text, save a file called
.gdbinitin your user folder.
- In the file add the following:
set startup-with-shell off
- Save the file
- gdb should now work
Where is .gdbinit is located and how can I edit it?