I'm trying to improve my own GDB pretty printers using the GDB python API.
Currently I'm testing them with a core.
I'm trying to get info for some QMap, QList content, but they have so many elements that printing them with it's contents is really slow (minutes).
So, I would like to know if there is any known way to profile which parts are slower.
I've already checked Python profile manual and google-perftools, but I don't know how to use them in the GDB execution cycle.
gdbcommands.txt:
source /home/user/codigo/git/kde-dev-scripts/gdb/load-qt5printers.py
source /home/user/codigo/myownprinters.py
core ../../core.QThread.1493215378
bt
p longQMapofQList
Link to load-qt5-printers.py content:
Then I launch gdb to automatically run those commands:
gdb-multiarch --command=~/bin/gdbcommands.txt