It is a problem that appeared when I first updated to macOS Sierra yesterday.
GDB itself is running OK. However, somehow, it cannot run my program. When I type 'run' and 'enter', it immediately crashes with the information: During startup program terminated with signal SIG113, Real-time event 113.
My GDB is based on homebrew. So today, I uninstalled the whole homebrew package and reinstalled it. After the codesign step, I still faced the same error.
I tried 'sudo' and a few other things. Google had no idea what happened. So I was wondering if you guys might have some magical solution.
The problem is caused by Apple switching away from GDB, the GNU debugger, to LLDB, the LLVM debugger, in their Xcode toolchain (along with the transition from GCC to Clang). Unfortunately, Eclipse is not capable of communicating with any debugger other than GDB (yet).
I just installed it (gdb 8.0) following this procedure as of today, it works on Mac OS High Sierra 10.13. 2 (17C88). For the latest version "brew install gdb" is fine. However, the steps above will allow you to install older versions which is handy.
If you don't already have gdb on your system, then you'll need to install it. I'm going to show you how to install gdb by using Homebrew. If you have gdb on your system already, you can skip to the Generate a certificate step. If you received an error, then you'll need to install gdb using Homebrew.
gdb is not support, but you can use lldb .
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
.gdbinit
in your user folder.set startup-with-shell off
Sources
https://discussions.apple.com/thread/7684629?start=0&tstart=0
Where is .gdbinit is located and how can I edit it?
https://sourceware.org/gdb/onlinedocs/gdb/Starting.html
I got the same error after updating to macOS Sierra. Temporarily I changed debugger to LLDB using the library lldbmi2:
1. git clone https://github.com/freedib/lldbmi2.git lldbmi2
2. cd lldbmi2
3. mkdir build
4. cd build
5. cmake ../
6. make
7. sudo make install
Once lldbmi2 is installed, you can debug your application by creating a new C/C++ Application in Debug Configurations... and change the GDB debugger (in Debugger tab) from gdb to lldbmi2. Options to lldbmi2 may be set there. Something like /usr/local/bin/lldbmi2 --log.
Everything seems to be working fine, and even better as GDB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With