Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading gdb for use in Qt Creator

Tags:

gdb

qt

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

like image 587
TonyK Avatar asked Mar 21 '11 16:03

TonyK


1 Answers

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.

like image 191
Stephen Chu Avatar answered Sep 22 '22 11:09

Stephen Chu