在Eclipse中进行C ++调试的macOS 10.15 Catalina gdb问题

问题描述:

我正在使用macOS 10.15.2 Catalina,并试图在Eclipse中调试Hello World C ++程序. 我已经从Homebrew安装了gdb调试器,并按照以下链接中的步骤对证书进行了签名.

I am using macOS 10.15.2 Catalina and am trying to debug a Hello World C++ program in Eclipse. I have set up gdb debugger by installing it from Homebrew and signing the certificate by following the procedure in the below link.

调试器无法启动.

我已经在Eclipse中设置了gdb设置,如下面的屏幕截图所述.

I have set gdb settings in the Eclipse as mentioned in the below screenshot.

调试项目时,出现错误:Configuring GDB Aborting configuring GDB(下面也提供了其屏幕截图).

When I debug the project, I am getting error: Configuring GDB Aborting configuring GDB (its screenshot is also provided below).

您正在使用哪个版本的gdb和Eclipse?

Which versions of gdb and Eclipse are you using?

我将尝试提及过去遇到问题的一些方面.

I'll try to mention some aspects with which I had problems in the past.

  1. 如果您使用Homebrew安装了gdb,请尝试将"GDB调试器"字段设置为实际路径,例如/usr/local/Cellar/gdb/8.3/bin/gdb而不是链接/usr/local/bin/gdb.

.gdbinit文件在哪里?在本教程中,它位于用户主文件夹中,因此在Eclipse调试配置中,GDB命令文件设置为~/.gdbinit.屏幕快照中的值未指定绝对路径,可能是在错误的位置寻找它.

Where is your .gdbinit file located? In the tutorial, it is located in the user home folder, so in the Eclipse debug configuration the GDB command file is set to ~/.gdbinit. The value in your screenshot doesn't specify an absolute path, it might be looking for it in the wrong place.

您的gdb证书是系统钥匙串(而不是登录钥匙串)的一部分吗?在签名期间,您是否将权利文件作为参数传递了?

Is your gdb certificate part of the System Keychain (rather than the login Keychain)? During the signing have you passed the entitlements file as argument?