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++ 调试?
基础教程推荐
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
