Cannot step into Qt sources - Install Qt Debug Symbols with Web Installer?
-
Hi there,
I try to debug Qt and I'd like to step into the Qt sources, but it does not work. I only see assembly. I installed Qt 5.2.1 using the web installer and I also installed the sources using the web installer. I pointed QtCreate to the sources (in Tools->Options->Debugger), but still I am not able to step into Qt sources.
Looking into the build configuration in Qt/5.2.1/gcc_64/mkspecs/qconfig.pri, I see that it is configure with "debug_and_release", so I think a debug build was generated.
Am I missing something?
Are the debug symbols installed by the web installer? How can I find out whether I do have the debug symbols installed?Any help is appreciated :-)
best regards,
Andreas -
Hi,
Also, what OS are you running Qt on ?
-
Hi Clochydd,
thanks for your help.
Yes, I am building in debug mode. I can step through my code, but not Qt's.I am using Linux Mint 16, building for PC and Android, using Qt 5.2.1. I cannot step into Qt sources, no matter if I am debugging on android or PC.
-
I am investigating this bug:
https://bugreports.qt-project.org/browse/QTBUG-38024And I would like to see the code in all levels of the callstack of my mousePressEvent handler to understand what is happening. So I would like to step into
QGraphicsScene::event
QApplication::notify
QGraphicsView::mousePressEvent
and the like.As said, I am on Linux Mint 16, using Qt 5.2.1, developing for PC and Android.
-
You need to verify that you have debug version of Qt libraries.
Run
@
file libQt5Widgets.so.5.2.1
@if result contains a word "stripped" then the library does not have debug info.
In this case you need to rebuild Qt libraries with
@
./configure some_other_options -debug
@see @./configure --help@ for more info
-
Thanks a lot, that was one piece of the information I need. The PC shared objects are indeed stripped, so I do understand that problem now:
@
$ file Qt/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
Qt/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xd01475f7c6e3e5bf736d8889f978404a3203caa5, stripped
@For the Android case I am still confused. The shared object in the libs directory of the installation is not stripped:
@
$ file Qt/5.2.1/android_armv7/lib/libQt5Widgets.so.5.2.1
Qt/5.2.1/android_armv7/lib/libQt5Widgets.so.5.2.1: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
@But the shared object in the build directory, which is used to build the package for android, is stripped. It seems the Qt tools strip away debug symbols during deployment?!
@
$ file qt_examples/build-sensors_test-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libQt5Widgets.so
qt_examples/build-sensors_test-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libQt5Widgets.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped
@ -
Yep, I'm sure it is stripped during deployment because of a size difference.
libQt5Widgets.so is 6.5 Mb stripped library and 75 Mb is not-stripped.Try to copy non-stripped library on top of installed if you have enough space on Android.
-
Great, thanks a lot for your help.
Most of the time I'd like to debug on my PC, only when the phone act different to my PC I'd like to really debug on the phone.
The shared objects for the PC installed by the web installer are stripped, so no debugging is possible. Is there a way to get libs with debug information using the web installer? In the installer there is no option to install debug symbols, but it has some options to add repositories, but I was not able to find any information on what repositories you can add there.