There appears to be a lot about installing gdb into eclipse on the web. However to actually get it to work is a little tricky. Basically it comes down to gdb 8.1 doesn’t work and you need to go to an earlier version 8.0.1
The basic instructions are.
1) Install Xcode
2) Install eclipse.
3) install gdb using homebrew. (Need to install 8.0.1) see link below. Latest doesn’t work.
4) Create a certificate to sign gdb. This again is tricky as creating the certificate under system doesn’t directly work, so you need to install it under login and then drag and drop it to system.
5) You don’t need to mess around with “csrutil enable –without debug”.
Caveats I learnt: If you remove a the signing from the gdb executable, you need to reinstall it or you can’t resign it. I believe you can however re-sign it if it is still signed.
Cut and paste from the page:
Thanks to lokoum
OK I got it. Thank you @marcoparente !!
$brew uninstall –force gdb
$brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/c3128a5c335bd2fa75ffba9d721e9910134e4644/Formula/gdb.rb
This should show 8.0.1
$codesign -fs [cert-name] /usr/local/bin/gdb
‘set startup-with-shell off’ in ~/.gdbinit
That’s it !!!