Search code examples
eclipsedebugginggdbgnu

'Failed to execute MI command: -exec-run' error when trying to debug a GNU project with Eclipse


I wish to debug GNU Emacs in Eclipse IDE for C/C++ on my macOS Sierra. I have downloaded the source code with Git and built the project successfully via the command line. I then imported the project to Eclipse as an existing Makefile project with the GNU autotools toolchain setting.

I can now run the Emacs GUI from Eclipse. However, when I try to debug it (with gdb), I get the following error message:

'Launching emacs-26.0.50.1' has encountered a problem.

Error in final launch sequence

Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program terminated with signal ?, Unknown signal.
During startup program terminated with signal ?, Unknown signal.

Error message


Solution

  • I managed to get rid of this error by specifying the full path to the .gdbinit file in the Run > Debug Configurations... > C/C++ Application > emacs-26.0.50.1 > Debugger > GDB command file: textbox.

    I now get a different error, but this is a matter for another question...