Using CLion's bundled GDB through Rosetta on Apple Silicon Mac?

Answered

Hello! Is there a way to use CLion's bundled GDB debugger through Rosetta on an Apple Silicon Mac?

Creating a fresh (C++) project in CLion, and running a debug configuration results in an immediate exit with a `Process finished with exit code 1` message when the debugger is changed from the bundled LLDB debugger to the bundled GDB debugger. This is somewhat expected, as GDB does not support Apple Silicon ARM architecture. However, I hope it might be possible to run the bundled GDB debugger through Rosetta.

I have added `set(CMAKE_OSX_ARCHITECTURES "x86_64")` to my CMakeLists.txt to compile the default hello world script as an `x86_64` executable, and confirmed the binary is compiled as one. I also attempted running the Intel version of CLion through Rosetta. However, the immediate exit with the `Process finished with exit code 1` message persists. I'm assuming CLion is internally calling the bundled GDB with using the ARM architecture. Is there a simple way to have CLion use the GDB debugger through Rosetta?

1 comment
Comment actions Permalink

Hello!

Unfortunately, the bundled GDB doesn't work on macOS 10.14 Mojave and newer - https://youtrack.jetbrains.com/issue/CPP-14546/Bundled-GDB-doesnt-work-on-macOS-1014-Mojave-and-newer. We even plan to remove the Bundled GDB from Toolchain page for OS X. 

Sorry for the inconvenience.

0

Please sign in to leave a comment.