Skip to content

gdb extension doesn't work with Python 2.7

(gdb) python import ghc_gdb
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/omer/.local/lib/python2.7/site-packages/ghc_gdb/__init__.py", line 5, in <module>
    from . import ghc_heap
  File "/home/omer/.local/lib/python2.7/site-packages/ghc_gdb/ghc_heap.py", line 577, in <module>
    PrintGhcClosureCmd()
  File "/home/omer/.local/lib/python2.7/site-packages/ghc_gdb/ghc_heap.py", line 372, in __init__
    self.__class__.__doc__ += '\n' + self._parser.format_help()
AttributeError: attribute '__doc__' of 'type' objects is not writable
Error while executing Python code.

Deleting this line makes it work.