GDB pretty printers for Qt5

江枫思渺然 提交于 2020-01-01 09:27:11

问题


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.


回答1:


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




回答2:


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

https://cgit.kde.org/kdevelop.git/tree/plugins/gdb/printers

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




回答3:


As far as I know pretty printers are located here: http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/

Also, GDB binaries with Python enabled can be found here. http://origin.releases.qt-project.org/gdb/



来源:https://stackoverflow.com/questions/10492290/gdb-pretty-printers-for-qt5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!