Install GDB 8.1/8.0.1 in Eclipse Oxygen 2 on High Sierra 10.13.3,

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
$gdb –version
This should show 8.0.1
$codesign -fs [cert-name] /usr/local/bin/gdb
and add
‘set startup-with-shell off’ in ~/.gdbinit

That’s it !!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.