1

I have trouble getting GDB to work in Eclipse CDT. Here is my situation / sequence of events:

  • I'm on Mac OS Sierra 10.12.4
  • Eclipse CDT version 4.6.3
  • I installed GDB following the instructions here - everything went smoothly: I code-signed the executable and pointed Eclipse to it
  • I opened an existing project in Eclipse that is error-free, i.e. a project that I know is working - it compiles, it runs, all good.
  • I started the debug mode in Eclipse.
  • Before Eclipse could even enter the debug mode, I got the following error message in a pop-up dialog titled 'Problem Occurred' right away:

"'Launching [Exectuable]' has encountered a problem.

Error in final launch sequence

Details:"

Error in final launch sequence
     Failed to execute MI command:
     -exec-run
Error message from debugger back end:
During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.
During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.

[Executable] is a placeholder for the executable I was trying to launch. I'm not quite sure what to do with this error message.

  1. How can I find out why Eclipse failed to execute the MI command?
  2. Why did the program terminate with a trace/breakpoint trap? I didn't even set any breakpoints.
Alex
  • 3,316
  • 4
  • 26
  • 52
  • 1
    Something Sierra specific. Many result on Google, all of them about it. https://forum.lazarus.freepascal.org/index.php?topic=34371.0 – Eugene Sh. May 26 '17 at 21:02
  • Thanks @EugeneSh., it's indeed Sierra-specific as it seems, or System Integrity Protection-specific to be more precise. I've just turned off SIP and now GDB works in Eclipse. Thanks for pointing me towards this. – Alex May 26 '17 at 21:22
  • related: https://stackoverflow.com/questions/22640787/debugging-in-eclipse-using-gdb-on-mac-failed-to-execute-mi-command-exec-run | https://stackoverflow.com/questions/13678923/eclipse-failed-to-execute-mi-command-target-select-remote – Ciro Santilli OurBigBook.com Aug 20 '17 at 12:59

0 Answers0