How to pretty-print STL containers in GDB?

前端 未结 9 603
一整个雨季
一整个雨季 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 21:11

    You can try with below GDB macro (append it to your ~/.gdbinit file) to print STL containter types data and even their data members: https://gist.github.com/3978082

提交回复
热议问题