How to pretty-print STL containers in GDB?

前端 未结 9 584
一整个雨季
一整个雨季 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:14

    Similar to enter link description here Worked for me in ~/.gdbinit:

    python
    import sys
    sys.path.insert(0, '/usr/share/gcc-8/python')
    from libstdcxx.v6.printers import register_libstdcxx_printers
    register_libstdcxx_printers (None)
    end
    

提交回复
热议问题