Pretty Printers Error Running Python Code in Eclipse Ubuntu 14

I am trying to enable Pretty Printing in Eclipse in Ubuntu 14.0.4. I followed the steps to set up pretty printing: http://wiki.eclipse.org/CDT/User/FAQ I have an SVNed directory, created a .gdbinit file with the suggested code and the correct path, and pointed my Eclipse debugger to this file. I fixed the error in the printerers.py file. When I run debugging with the selected, I get

Error in final launch sequence
Failed to execute MI command:
source /home/dreitz/python/init.gdbinit
Error message from debugger back end:
/home/dreitz/python/init.gdbinit:6: Error in sourced command file:\nError while executing Python code.
/home/dreitz/python/init.gdbinit:6: Error in sourced command file:\nError while executing Python code.

init.gdbinit contains python startup code. Can anyone understand what the problem is?

Some of the solutions I found confuse me:

  • The ~ .gdbinit file is referenced as updatable, instead of creating its own .gdbinit file. I do not know where to find this pre-existing file.

  • . , GDB , python 2.7.8.

+4
1

, , , .gdbinit :

python
import sys
sys.path.insert(0, '/your/path/here/python')
sys.path.insert(0, '/your/path/here/python/libstdcxx/v6')
from libstdcxx.v6.printers import register_libstdcxx_printers
end

, , , register_libstdcxx_printers (None), gdb , .

, , , , .

+9

All Articles