Alan
Alan

Reputation: 303

GDB with QtCreator cannot read variables

I have tried to setup QtCreator with Qt 5.9.5 on my new ubutnu 18.04 and have been met with spades of problems. Right now my issue is that certain variables cannot be read by GDB when trying to debug a project. I have already tried tinkering with GDB setting in QtCreator with no success, and now I think my issue is that I do not have the debugging symbols installed for Qt( As mentioned here: https://bugreports.qt.io/browse/QTCREATORBUG-8278) However when I search for debugging symbols via apt-get search I can see "qt4-bin-dbg - Qt 4 binaries debugging symbols" ( Which I installed ) but nothing for Qt 5. This link : https://packages.debian.org/sid/qtbase5-dbg suggests that it should be called qtbase5-dbg but this also does not exist. So, does anybody know how I can download the debugging symbols, or any alternative fix???

Upvotes: 0

Views: 153

Answers (1)

Sergio Monteleone
Sergio Monteleone

Reputation: 2886

This answer summarizes the content of the comments above.

Since Ubuntu Zesty, debug symbols for Qt5 are not distributed anymore. More details can be found on askubuntu here.

That is, there was indeed a qtbase5-dbg package, that is not available since Zesty.

Hence the solution is to use the Qt SDK as provided by the Qt company at http://download.qt.io/official_releases/qt/.

Alternatively, you can also download the sources and compile the Qt packages yourself. Using the Qt sources while debugging can be helpful if you experience bugs in the Qt framework itself.

Upvotes: 1

Related Questions