How to debug into Qt library on Linux
Hi all
I need to debug into Qt libraries, so I installed the package libqt4-dbg. Libraries are available in /usr/lib/debug/usr/lib/ and subdirectories, including libQtCore.so.4.6.2 and libQtGui.so.4.6.2; I assume these are debug libraries with symbol tables.
When I start to debug my application, execution stops at breakpoints in my code but I am unable to step with F11 into the library source code.
Do I need to instruct QtCreator to link with the debug libraries and not the standard, non-debug Qt libraries? How?
Do I need to let gdb know, where the libraries are? How?
Al_
System: Ubuntu lucid (10.04 LTS) with Qt version as standard for lucid, i.e., Qt 4.6.2 and QtCreator1.3.1
Re: How to debug into Qt library on Linux
Do the debug symbols match the Qt version you develop with?
[Complete independent and unrelated: Qt Creator 1.3.1 is _really old_ by now]
Re: How to debug into Qt library on Linux
@ktk
Yes, Qt version matches:
/usr/bin$ qmake-qt4 -v
QMake version 2.01a
Using Qt version 4.6.2 in /usr/lib
And the debug libraries in /usr/lib/debug/usr/lib have file names that end in ...so.4.6.2
Yes, QtCreator 1.3.1 is old. To get a newer version i will either need to make a distro upgrade (away from the LTS version) or manually update Qt.
Re: How to debug into Qt library on Linux
I did some further searching, without success. What I found, however:
- Unlike /usr/bin/qmake-qt4 the debug version was not executable (it is now; but did not help)
- When I add in QtCreator to the setting 'Qt Versions' /usr/lib/debug/usr/bin/qmake-qt4 as additonal version, the dialog states that /usr/lib/debug/usr/bin/qmake-qt4 is no valid Qt installation (in German: 'keine gültige Qt-Installation').
- The debug qmake-qt4 seems to erroneously use the Qt version in /usr/lib, i.e., the non-debug version:
/usr/lib/debug/usr/bin$ qmake-qt4 -v
QMake version 2.01a
Using Qt version 4.6.2 in /usr/lib
What am I doing wrong?