How to pretty-print STL containers in GDB?

前端 未结 9 587
一整个雨季
一整个雨季 2020-11-30 20:45

I\'ve followed the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers. My ~/.gdbinit now looks like this:

<         


        
9条回答
  •  执笔经年
    2020-11-30 21:19

    Check your gcc version. If it is less than 4.7, you need use another printer.py file. Get the file from http://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch/libstdc++-v3/python/.

提交回复
热议问题