如何在使用Eclipse CDT进行调试时向gdb提示符输入命令? [英] How can I enter commands to a gdb prompt while debugging with Eclipse CDT?

查看:355
本文介绍了如何在使用Eclipse CDT进行调试时向gdb提示符输入命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Eclipse(Helios SR1)CDT进行我的C ++开发。 Eclipse与GDB接口用于调试,但我不知道如何通过Eclipse界面调试时手动输入命令到GDB。例如,可以输入 p myVar ,而不必单击并滚动局部变量窗口。

I'm using Eclipse (Helios SR1) CDT for my C++ development. Eclipse interfaces with GDB for debugging, but I can't figure out how to manually enter commands to GDB while debugging through the Eclipse interface. For example, it would be nice to be able to enter p myVar instead of having to click and scroll through the local variables window.

注意:我想使用Eclipse接口进行调试的唯一原因是因为我喜欢它如何显示正在逐步通过的代码。所以如果任何人有一个替代建议,将允许我查看正在逐步通过的代码,请建议! (我使用了DDD,但我不是特别喜欢它。)

Note: The only reason I'd like to use the Eclipse interface for debugging is because I like how it shows the code that is being stepped through. So if anyone has an alternative to suggest that would allow me to view the code that's being stepped through, please suggest! (I've used DDD, but I don't especially like it.)

推荐答案

它其实很简单。

开始调试(eclipse将切换到Debug Perspective)。然后确保显示控制台视图。如果它不显示它(窗口 - >显示视图...)。在该视图中,您将找到显示所选控制台图标。选择向下箭头旁边的一个名为gdb(不是gdb跟踪!)的选择控制台。

Start debugging (eclipse will switch to Debug Perspective). Then make sure Console View is shown. If it's not show it (Window->Show view...). In that view you will find "Display selected console" icon. Select down arrow next to it an select console named "gdb" (not gdb traces!).

在这个控制台中输入的内容直接转发到gdb所有gdb命令)。

What you enter in this console is forwarded directly to gdb (you can use all gdb commands).

这篇关于如何在使用Eclipse CDT进行调试时向gdb提示符输入命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆