← Back to team overview

touch-packages team mailing list archive

[Bug 921839] Re: gdb reports ImportError no module libstdcxx.v6.printers

 

Hello guys! I met the similar problem . When run gdb ,it shows like
that:

Traceback (most recent call last):

File "<string>",line 3, in <module>

File "/root/.gdb/python/libstdcxx/v6/_init_.py",line 19,in <module>

    from printers import register_libstdcxx_printers

ImportError: No module named 'printers'

/root/.gdbinit:4007:Error in sourced command file:

Error while executing Python code.

And I just update with the repository

 ppa:ubuntu-toolchain-r/test

as what you said, It still didn't work.

Any suggestions ? Thank you all

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/921839

Title:
  gdb reports ImportError no module libstdcxx.v6.printers

Status in gdb package in Ubuntu:
  Invalid

Bug description:
  GDB attempts to use a python "pretty printer" and reports the
  following error:

  [Thread debugging using libthread_db enabled]
  Traceback (most recent call last):
    File "/usr/local/lib64/libstdc++.so.6.0.16-gdb.py", line 59, in <module>
      from libstdcxx.v6.printers import register_libstdcxx_printers
  ImportError: No module named libstdcxx.v6.printers
  [Inferior 1 (process 31059) exited normally]
  (gdb)

  GDB Version: GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08

  I found that by doing the following it fixes the problem:

  svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python gdb_printers
  mv gdb_printers /usr/local/etc
  cd ~
  vi .gdbinit

  (copy & paste into .gdbinit)

  python
  import sys
  sys.path.insert(0, '/usr/local/etc/gdb_printers')
  from libstdcxx.v6.printers import register_libstdcxx_printers
  register_libstdcxx_printers (None)
  end

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/921839/+subscriptions