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.
我是Visual Studio用户,习惯于断点进行调试。我现在正在linux环境中工作,并使用Eclipse作为IDE。我是linux和eclipse的新手。我不知道如何在eclipse中使用gdb。我尝试在命令行中使用gdb,但并不像拥有UI那么容易。
How do I use gdb in eclipse?
我如何在eclipse中使用gdb?
1 个解决方案
#1
14
The following instructions are for Eclipse 3.5 (Galileo). For 3.6 (Helios), they are similar except for the link in step 2.
以下说明适用于Eclipse 3.5(Galileo)。对于3.6(Helios),它们是相似的,除了步骤2中的链接。
- Go to Help > Install New Software.
- 转到帮助>安装新软件。
- Add the CDT repository http://download.eclipse.org/tools/cdt/releases/galileo to the list of repositories.
- 将CDT存储库http://download.eclipse.org/tools/cdt/releases/galileo添加到存储库列表中。
- Select the CDT Repository. Now you need to install the CDT plugin along with GDB support from the list of available plugins (Select the CDT Main Features as well as CDT GNU Toolchain Debug support).
- 选择CDT存储库。现在您需要从可用插件列表中安装CDT插件以及GDB支持(选择CDT主要功能以及CDT GNU工具链调试支持)。
You should now be able to set breakpoints and inspect values of variables in Eclipse.
您现在应该能够在Eclipse中设置断点并检查变量的值。
An alternative is to install DDD (an GUI frontend for GDB).
另一种方法是安装DDD(GDB的GUI前端)。
#1
14
The following instructions are for Eclipse 3.5 (Galileo). For 3.6 (Helios), they are similar except for the link in step 2.
以下说明适用于Eclipse 3.5(Galileo)。对于3.6(Helios),它们是相似的,除了步骤2中的链接。
- Go to Help > Install New Software.
- 转到帮助>安装新软件。
- Add the CDT repository http://download.eclipse.org/tools/cdt/releases/galileo to the list of repositories.
- 将CDT存储库http://download.eclipse.org/tools/cdt/releases/galileo添加到存储库列表中。
- Select the CDT Repository. Now you need to install the CDT plugin along with GDB support from the list of available plugins (Select the CDT Main Features as well as CDT GNU Toolchain Debug support).
- 选择CDT存储库。现在您需要从可用插件列表中安装CDT插件以及GDB支持(选择CDT主要功能以及CDT GNU工具链调试支持)。
You should now be able to set breakpoints and inspect values of variables in Eclipse.
您现在应该能够在Eclipse中设置断点并检查变量的值。
An alternative is to install DDD (an GUI frontend for GDB).
另一种方法是安装DDD(GDB的GUI前端)。