Using Qt's debug libraries to debug Qt.
-
I have installed Qt using the Qt Online Installer for linux. Looking in the 5.11.1/gcc_64/lib directory, I see each library is there twice. The second one has an extra ".debug" suffix. I believe that I should be able to debug into Qt source if I can link with the debug version.
How do I specify to use the Qt debug libraries? I am doing a cmake build using QtCreator and running kubuntu 18.04.
-
These are just the debug informations which get loaded by gdb when you're debugging. So all should work already.
-
It did not work initially. I then added a .gdbinit with source paths and it is working now. There are a lot of source paths to setup in .gdbinit to get full Qt coverage. Is there any automatic method of setting this up?
-
At least you can search all path similar like this
find /<install_path>/5.11.1/gcc_64/lib -name "*.debug" | xargs dirname | sort -u
-
The .gdb dir command needs the source paths, not the *.debug path.
I am doing Ok by manually adding the needed paths. Closing.