'Failed to execute MI command: -exec-run' 尝试使用 Eclipse 调试 GNU 项目时出错

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

我希望在我的 macOS Sierra 上为 C/C++ 在 Eclipse IDE 中调试 GNU Emacs。我已经用 Git 下载了源代码,并通过命令行成功构建了项目。然后,我使用 GNU autotools 工具链设置将该项目作为现有 Makefile 项目导入到 Eclipse。

我现在可以 运行 来自 Eclipse 的 Emacs GUI。但是,当我尝试调试它时(使用 gdb),我收到以下错误消息:

'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.

通过在 Run > Debug Configurations... > C/C++ Application > emacs-26.0.50.1 > Debugger > GDB command file: 文本框中指定 .gdbinit 文件的 完整 路径,我设法摆脱了这个错误。

我现在得到一个不同的错误,但这是另一个问题...

我在使用调试器处理小的伪代码时收到了类似的错误消息。我使用了 this link 中给出的建议并修复了它。简而言之,我不得不将调试器换成旧的。如果您仍然遇到同样的问题,希望对您有所帮助。

我的问题是使用 USB 3.0 端口。将电路板连接到 USB 2 端口并且工作正常。