[Development] Debugging into Qt binaries

Kuba Ober kuba at mareimbrium.org
Thu Jan 9 18:05:11 CET 2014


I’m trying to figure out the most constructive way of ensuring that an OS X build of Qt, installed with the source code, can be actually debugged by stepping into the C++ source code in the Qt library. So far I can only step into disassembly. This doesn't work out of the box on a fresh install of Qt 5.2, and it really has never worked with Qt 5 builds. I never got it working for a Qt 4 build either.

For Qt 5.2, the Debugger Log pane is full of messages like the below:
  Could not find object file "/work/build/qt5_workdir/w/s/qtbase/src/widgets/.obj/debug/qtabbar.o" - no debug information available for "qtabbar.cpp”.
Presumably this is because the Qt build has debug info, but the paths in the debug info refer to paths on the build host. Is there a magic incantation for gdb that would let it translate those object file locations to locations on the installed variant of Qt? This is presumably not the same as the incantations needed to translate source file locations...

Is there no way of getting it working out of the box? Is it an oversight? Or nobody has time to deal with this? Any pointers on where to start? I would at least like to have a working procedure assembled that ends up with Qt being debuggable. This is quite puzzling since there are debug libraries installed for all the Qt frameworks, and I have the sources installed as well.

Isn’t it a reasonable expectation that this should work out of the box as long as you install the sources when installing the official Qt build?

Thanks, Kuba Ober


More information about the Development mailing list