pythongdbubuntu-16.04cuda-gdb

NSight gdb error


I have a problem with the "pretty printer" option of IDE NSight (eclipse) when I try to debug. I have googled but I have not found a solution to my problem.

When I start to debug, appears the next message:

Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py", line 64, in <module>
    register_libstdcxx_printers(gdb.current_objfile())
  File "/usr/lib/x86_64-linux-gnu/../../share/gcc-5/python/libstdcxx/v6/__init__.py", line 33, in register_libstdcxx_printers
    register_libstdcxx_xmethods(obj)
  File "/usr/lib/x86_64-linux-gnu/../../share/gcc-5/python/libstdcxx/v6/xmethods.py", line 600, in register_libstdcxx_xmethods
    gdb.xmethod.register_xmethod_matcher(locus, ArrayMethodsMatcher())
  File "/usr/share/gdb/python/gdb/xmethod.py", line 266, in register_xmethod_matcher
    index = _lookup_xmethod_matcher(locus, matcher.name)
  File "/usr/share/gdb/python/gdb/xmethod.py", line 236, in _lookup_xmethod_matcher
    for i in range(0, len(locus.xmethods)):
AttributeError: 'gdb.Objfile' object has no attribute 'xmethods'

I'm not sure where is the problem but the variables values doesn't appear and the only solution is to disable the pretty print option.

I'm using Ubuntu 16.04 and the cuda toolkit was installed from repositories.

If anyone can help, I will be very grateful.


Solution

  • This sounds like a bug in your gdb installation. gdb.Objfile.xmethods is something that should be provided by the gdb core, which implements gdb.Objfile. So, examining it from /usr/share/gdb/python/gdb/xmethod.py should be ok -- because that is also a file that comes with gdb.