I'm currently experiencing an error with GDB debugging on Eclipse MacOS Big Sur

Viewed 1032

I'm currently having a strange error after installing my GDB through Homebrew on Big Sur. I have configured everything to my Eclipse properly (with my GDB linked as the debugger). However every time I attempt to start a debug, nothing happens, and the following appears in the console:

**00:01:58 **** Incremental Build of configuration Debug for project generic_project ****

make all

make: Nothing to be done for `all'.

00:01:58 Build Finished. 0 errors, 0 warnings. (took 112ms)**

Is there anyway to get around this? I truly cannot figure it out. Any help is appreciated.

1 Answers

I am on Sierra but experienced the exact same symptoms and resolved the issues by downgrading gdb versions to 9.2.2.

It turns out that the latest versions of Eclipse CDT and the newer brew install gdb@10.2 do not play nicely. Sadly no earlier brew formulas are currently maintained either.

Your options are to git clone/re-build an older version, or to download the old 9.2.2 raw gitlab ruby script and install it as a brew formula locally. And then follow the code signing steps you have probably seen referenced elsewhere.

Something like:

% curl https://raw.githubusercontent.com/Homebrew/homebrew-core/95b9a2a56a8917eba5491805e3886b05573fab71/Formula/gdb.rb > ./gdb.rb
% brew uninstall gdb
% brew install ./gdb.rb
% # Assume you've created gdb-entitlements.xml and a private cert per many gdb signing instructions found elsewhere
% codesign --entitlements gdb-entitlement.xml -fs your-code-signing-cert-name $(which gdb)

After a recommended reboot, and a modification to debug configurations (eclipse wide and/or project-wide settings) to reference the symbolic link /usr/local/bin/gdb you should be good.

The whole process is pretty well explained here although the downgrade is to gdb 8.3.

The Eclipse forum here did tip me off to this version incompatibility but I can't for the life of me find the link that was instrumental.

Related