升级gdb以在Qt Creator中使用 [英] Upgrading gdb for use in Qt Creator

查看:155
本文介绍了升级gdb以在Qt Creator中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最新版本的Qt安装gdb版本7.1。这有一个恼人的错误:它将某些完美有效的表达式评估为<不可用的同步数据> 。显然这已经在gdb 7.2版中得到了修复,所以我下载了最新的gdb.exe并将它复制到 Qt \pythongdb\gdb-i686-pc-mingw32.exe 。唉,这不是成功的:枚举被评估为< anonymous enum> ,而不是(比如) myHelpfulEnumVal ,和(void *)p 被评估为 void * 而不是(比方说) cbf56e0 。所以我回到了gdb版本7.1。

是否有人知道我还有什么要把gdb 7.2与Qt Creator集成?或者它还没有实现?

我在Windows 7下使用minGW。



更新我完成了Stephen Chu建议,现在我正在使用Qt Creator 2.2和gdb 7.2。它似乎工作正常。但是我必须弄清楚如何告诉Qt Creator在哪里可以找到gdb,因为这样做的方式已经改变了:转到 Tools - >选项 - >工具链。你应该可以看到(至少,我在Windows下使用mingw)一个自动检测列表和一个手动列表。 手册列表包含一个单独的项目:



MinGW来自Simulator Qt for MinGW 4.4 Qt SDK)



点击此处,您可以输入 gdb 调试器:字段中。在我的情况下,这是

C:\ Qt\qtcreator-2.1.81\pythongdb\gdb-i686-pc- mingw32.exe



HTH

解决方案

Creator 2.2包含gdb 7.2。因此,您可以在此下载并尝试快照: ftp://ftp.qt.nokia。 com / qtcreator / snapshots / latest /

我不知道您是否可以从2.2复制gdb并在2.1中使用它。但值得一试。我使用2.2快照,因为它现在足够稳定。


The latest version of Qt installs gdb version 7.1. This has an annoying bug: it evaluates certain perfectly valid expressions as <unavailable synchronous data>. Apparently this has been fixed in gdb version 7.2, so I downloaded the latest gdb.exe and copied it to Qt\pythongdb\gdb-i686-pc-mingw32.exe. Alas, this was not a success: enums were evaluated as <anonymous enum> instead of (say) myHelpfulEnumVal, and (void*)p was evaluated as void* instead of (say) cbf56e0. So I reverted to gdb version 7.1.
Does anybody know what else I have to do to integrate gdb 7.2 with Qt Creator? Or is it simply not implemented yet?
I am using minGW under Windows 7.

Update I have done as Stephen Chu suggests, and am now using Qt Creator 2.2 with gdb 7.2. It seems to work fine. But I had to work out how to tell Qt Creator where to find gdb, because the way to do this has changed: Go to Tools -> Options -> Tool Chains. You should see (at least, I did, using mingw under Windows) an Auto-detected list and a Manual list. The Manual list contains a single item:

MinGW from Simulator Qt for MinGW 4.4 (Qt SDK)

Click on this, and you can enter the path to gdb in the Debugger: field. In my case, this is

C:\Qt\qtcreator-2.1.81\pythongdb\gdb-i686-pc-mingw32.exe

HTH

解决方案

Creator 2.2 includes gdb 7.2. So you can download and try the snapshots here: ftp://ftp.qt.nokia.com/qtcreator/snapshots/latest/

I don't know if you can copy the gdb from 2.2 and use it in 2.1. But it's worth a try. I use 2.2 snapshots since it's stable enough right now.

这篇关于升级gdb以在Qt Creator中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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