Basically it's the same as QtCreator supports, however with a few differences:
- also works in plain gdb on commandline
- no compiled debug-helper library needed
- a gdb-only solution
Of course everything can be combined, as seen here:
Currently supported classes are: QString, QByteArray, QList, QMap, QDate, QTime, QDateTime
The code can be found in KDevelop git (gdb plugin uses them by default). For using in cli you need the following in ~/.gdbinit:
python
import sys
sys.path.insert(0, '/home/niko/kdesvn/kde-git/kdevelop/debuggers/gdb/printers')
from qt4 import register_qt4_printers
register_qt4_printers (None)
end
set print pretty 1
import sys
sys.path.insert(0, '/home/niko/kdesvn/kde-git/kdevelop/debuggers/gdb/printers')
from qt4 import register_qt4_printers
register_qt4_printers (None)
end
set print pretty 1
Gdb also supports autoloading the pretty printers - they could be included in -dev packages. The merge request that would add it to qt is still pending.
And now I'm off watching an episode of dexter :D