1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Pretty-printers for GDB
These allow you to use GDB's print command to print useful representations of
Qt objects, like QStrings. At least GDB 7.3 is required.
The printers can be loaded globally, by sourcing the load-qt5printers.py file.
This can interfere with Qt4 debugging sessions, though, so you probably want to
do this on a per-session basis.
Alternatively, you can use create-qt5-autoloaders.py to generate auto-load
scripts that will load and unload the pretty printers with the Qt5 libraries.
Note that you will have re-generate these every time the Qt5 soversion changes
(ie: whenever you upgrade your Qt5 instance).
See the comments at the top of the script files for more information.
At some point, possibly when it's a bit more complete and has had a bit of
testing, this should be upstreamed to Qt, which will eliminate the need for
users to generate the auto-load scripts.
NOTE
====
KDevelop also provides GDB pretty-printers, which should work with Qt4 and Qt5
(they attempt to auto-detect the version at runtime). Those ones are suitable
for including in your ~/.gdbinit. I may, therefore, remove these ones at some
point in the future (probably after upstreaming them to Qt).
See https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repository/revisions/master/show/debuggers/gdb/printers
|