开发者

Upgrading gdb for use in Qt Creator

开发者 https://www.devze.com 2023-02-18 22:36 出处:网络
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

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 minG开发者_运维百科W 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号