Ubuntu 14.04, gcc 4.8.4: gdb pretty printing doesn't work because of Python issue

前端 未结 1 926
眼角桃花
眼角桃花 2020-12-09 03:56

I\'m getting this error when launching a program in gdb:

Using host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".
Traceback (most recent          


        
相关标签:
1条回答
  • 2020-12-09 04:51

    I'm posting this as an answer so it will be easier for others to find it. The comments from Mark Plotnick and webbertiger are the actual answer.

    To summarize, here is what worked for me:

    • Created a ~/.gdbinit file
    • Added python sys.path.append("/usr/share/gcc-4.8/python"); to that file

    I'm using Eclipse CDT so I checked that this file is being used in window > preferences > GDB > GDB command file.

    0 讨论(0)
提交回复
热议问题