For good Python printers, you need two things:
- Gdb that supports beautiful python printers and
- The actual Python code to print the type you want.
The first part should be available for the latest Linux distributions (the Archer branch was merged into GDB 7.0, so if you have 7.0 or newer GDB, you should be fine).
The second part requires that you install a beautiful printer so that GDB can find it. You are probably missing this part.
Ultimately, GDB will be able to automatically find beautiful printers on its own, but this feature is newer (I think this is only in GDB 7.2) and requires that GLIB developers distribute their pretty printers with libglib2.0-0-dbg , which (I assume) they have not done yet.
You can check: dpkg -L libglib2.0-0-dbg | grep '\.py$' dpkg -L libglib2.0-0-dbg | grep '\.py$' . If no .py files are listed on this list, then pretty printers are missing. If so, they are probably present, but GDB does not find them.
A nice printer for GHashTable seems to have been added here .
source share