How do I use GDB in Eclipse for C/C++ Debugging?(如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?)
问题描述
我是 Visual Studio 用户,习惯于使用断点进行调试.我现在在 linux 环境中工作,并使用 Eclipse 作为 IDE.我是 linux 和 eclipse 的新手.我不知道如何在 eclipse 中使用 gdb.我尝试在命令行中使用 gdb,但并不像拥有 UI 那样简单.
I'm a Visual Studio user and am used to breakpoints for debugging. I'm now working in a linux environment and am using Eclipse as an IDE. I'm a newbie in linux and eclipse. I don't have any idea how to use gdb in eclipse. I tried using gdb in command line, but is not as easy as having a UI.
如何在 Eclipse 中使用 gdb?
How do I use gdb in eclipse?
推荐答案
以下说明适用于 Eclipse 3.5 (Galileo).对于 3.6 (Helios),除了第 2 步中的链接之外,它们是相似的.
The following instructions are for Eclipse 3.5 (Galileo). For 3.6 (Helios), they are similar except for the link in step 2.
- 转到帮助 > 安装新软件.
- 添加 CDT 存储库 http://download.eclipse.org/tools/cdt/发布/伽利略 到存储库列表.
- 选择 CDT 存储库.现在您需要从可用插件列表中安装 CDT 插件以及 GDB 支持(选择 CDT 主要功能以及 CDT GNU 工具链调试支持).
您现在应该能够在 Eclipse 中设置断点并检查变量的值.
You should now be able to set breakpoints and inspect values of variables in Eclipse.
另一种方法是安装 DDD(GDB 的 GUI 前端).
An alternative is to install DDD (an GUI frontend for GDB).
这篇关于如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?


- C++ 和 Java 进程之间的共享内存 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01