Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB pretty printers for Qt5

Tags:

c++

python

gdb

qt

qt5

Where I can find gdb pretty printers for qt5?

I could find only for qt4 on kde developer site. Maybe somebody knows whether pretty printers for new version of Qt exist and where I can find them.

I know that it's possible to use latest version of QtCreator, but I need just plain python scripts for GDB.

like image 519
Igor Alexandrov Avatar asked May 08 '12 03:05

Igor Alexandrov


2 Answers

The pretty printers listed on https://techbase.kde.org/Development/Tutorials/Debugging/Debugging_with_GDB are only partially compatible with Qt 5. Some types (such a QByteArray) are not handled correctly.

Alex Merry has worked on Qt 5 pretty printers and tried to push these into the Qt5 Base packages (unfortunately it did not made it). For convenience, I have made his printers available at https://github.com/Lekensteyn/qt5printers

like image 100
Lekensteyn Avatar answered Oct 06 '22 04:10

Lekensteyn


For reference, the following (gdbinit + *.py) supports qt5 objects, and appears to be periodically updated:

https://invent.kde.org/kdevelop/kdevelop/-/tree/master/plugins/gdb/printers

https://github.com/KDE/kdevelop/tree/master/plugins/gdb/printers

like image 43
elbeardmorez Avatar answered Oct 06 '22 02:10

elbeardmorez