简体   繁体   English

我目前在 Eclipse MacOS Big Sur 上调试 GDB 时遇到错误

[英]I'm currently experiencing an error with GDB debugging on Eclipse MacOS Big Sur

I'm currently having a strange error after installing my GDB through Homebrew on Big Sur.通过 Big Sur 上的 Homebrew 安装 GDB 后,我目前遇到了一个奇怪的错误。 I have configured everything to my Eclipse properly (with my GDB linked as the debugger).我已经正确配置了我的 Eclipse 的所有内容(我的 GDB 链接为调试器)。 However every time I attempt to start a debug, nothing happens, and the following appears in the console:但是,每次我尝试开始调试时,都没有任何反应,并且控制台中会出现以下内容:

**00:01:58 **** Incremental Build of configuration Debug for project generic_project **** **00:01:58 **** 项目 generic_project 配置调试的增量构建 ****

make all做所有

make: Nothing to be done for `all'. make: 'all' 无事可做。

00:01:58 Build Finished. 00:01:58 构建完成。 0 errors, 0 warnings. 0 个错误,0 个警告。 (took 112ms)** (耗时 112 毫秒)**

Is there anyway to get around this?有没有办法解决这个问题? I truly cannot figure it out.我真的想不通。 Any help is appreciated.任何帮助表示赞赏。

I am on Sierra but experienced the exact same symptoms and resolved the issues by downgrading gdb versions to 9.2.2.我在 Sierra 但遇到了完全相同的症状并通过将 gdb 版本降级到 9.2.2 解决了问题。

It turns out that the latest versions of Eclipse CDT and the newer brew install gdb@10.2 do not play nicely.事实证明,最新版本的 Eclipse CDT 和较新的brew install gdb@10.2不能很好地播放。 Sadly no earlier brew formulas are currently maintained either.遗憾的是,目前也没有维护早期的酿造配方。

Your options are to git clone/re-build an older version, or to download the old 9.2.2 raw gitlab ruby script and install it as a brew formula locally.您的选择是 git 克隆/重新构建旧版本,或下载旧的 9.2.2 原始 gitlab ruby 脚本并将其作为 brew 公式安装在本地。 And then follow the code signing steps you have probably seen referenced elsewhere.然后按照您可能在其他地方看到的代码签名步骤进行操作。

Something like:就像是:

% curl https://raw.githubusercontent.com/Homebrew/homebrew-core/95b9a2a56a8917eba5491805e3886b05573fab71/Formula/gdb.rb > ./gdb.rb
% brew uninstall gdb
% brew install ./gdb.rb
% # Assume you've created gdb-entitlements.xml and a private cert per many gdb signing instructions found elsewhere
% codesign --entitlements gdb-entitlement.xml -fs your-code-signing-cert-name $(which gdb)

After a recommended reboot, and a modification to debug configurations (eclipse wide and/or project-wide settings) to reference the symbolic link /usr/local/bin/gdb you should be good.在建议重新启动并修改调试配置(eclipse 范围和/或项目范围的设置)以引用符号链接 /usr/local/bin/gdb 之后,您应该会很好。

The whole process is pretty well explained here although the downgrade is to gdb 8.3.尽管降级到 gdb 8.3,但整个过程在这里得到了很好的解释。

The Eclipse forum here did tip me off to this version incompatibility but I can't for the life of me find the link that was instrumental. 此处的 Eclipse 论坛确实提示我此版本不兼容,但我终生无法找到有用的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 配置:错误:C 编译器无法创建可执行文件(macOS:Big Sur) - configure: error: C compiler cannot create executables (macOS: Big Sur) 命令 gdb 出错。 eclipse中的调试问题 - Error with command gdb. Debugging problem in eclipse 使用远程 GDB 在 Eclipse 中进行调试 - Debugging in Eclipse with remote GDB 检查 MacOS Big Sur 上的库是否存在 - Checking for library existence on MacOS Big Sur 在 macOS Big Sur 上接收 UDP 多播 - Receiving UDP multicast on macOS Big Sur 如何使用 CLion 在 MacOS Big Sur 上查看 memory 泄漏? - How can I see memory leaks on MacOS Big Sur using CLion? 我需要在 macOS Big Sur 上调用 CSBackupIsItemExcluded(可能来自框架或核心服务)什么? - What do I need to call CSBackupIsItemExcluded (probably from either Frameworks or Core Services) on macOS Big Sur? make 命令在 MacOS Big Sur 上不起作用 - 11.5.2 - make command does not work on MacOS Big Sur - 11.5.2 C 代码在 MacOS Catalina 或 Big Sur 中无法编译 - C Code Won't Compile in MacOS Catalina or Big Sur 如果删除了运行它的可执行文件,为什么 fork() 在 MacOs Big Sur 上会失败? - Why does fork() fail on MacOs Big Sur if the executable that runs it is deleted?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM