Skip to content

lengocthuong15/qt5printers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

qt5printers

Pretty Printers for Qt5 in GDB Ref: https://github.com/KDE/kdevelop/tree/master/plugins/gdb/printers

I was modified the files to match with my system

How to config

  1. Copy the files qt.py, helper.py and __init__.py to ~/.gdb/qt5printers/ (please create one if you haven't have it)

  2. Add the content bellow to your ~/.gdbinit

python
import sys, os.path
sys.path.insert(0, os.path.expanduser('~/.gdb'))
import qt5printers
qt5printers.register_qt_printers (None)
end
  1. Test your ~/.gdbinit, just call gdb in the command line, the output should looks like this and there is no error in the log
❯ gdb
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".

If there is any error, it will look like this

Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Traceback (most recent call last):
  File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'qt'
/home/thuongle/.gdbinit:8: Error in sourced command file:

The error may look different in your system, please change the syntax to match with your python version.

About

Pretty Printers for Qt5 in GDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages