bgoodr
bgoodr

Reputation: 2930

What version of GDB provides the gdb.printing Python module?

I am trying to get pretty-printing to work under Qt5 but on RHEL6.6 using its gdb version:

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)

I found https://stackoverflow.com/a/31766741/257924 which links to https://github.com/Lekensteyn/qt5printers which seems to provide the code to enable pretty printing on Qt5. But when I try it on my version of gdb on RHEL6.6, I get this:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/home/myusername/gdb/printers/qt5printers/__init__.py", line 42, in <module>
    import gdb.printing
ImportError: No module named printing

From that, I conclude that possibly the gdb version (and/or the python build into it) just must be too old to provide the gdb.printing module, but that is the root of my question. How do I figure out which gdb version is necessary (meaning I have to download and build it myself) to get pretty-printing to work under Qt5?

I cannot upgrade to a newer RHEL system due to decisions made by others (the company I work for) and thus is irrelevant to this question.

The command:

cat /etc/issue

emits:

Red Hat Enterprise Linux Workstation release 6.6 (Santiago)
Kernel \r on an \m

Upvotes: 0

Views: 329

Answers (1)

Tom Tromey
Tom Tromey

Reputation: 22549

According to the gdb NEWS file, gdb.printing was added in version 7.3, with some additions to the module being made in later releases.

Upvotes: 1

Related Questions