linux - How can I quickly see into complex structures during debugging with g++ and c++ -


this question has answer here:

modern c++ has lot of templated , wrapped elements become hassle during debugging because gdb generic debugger, without specific c++ features.

there's no way list elements in stl container. when using boost::shared_ptr shared pointer there's no way de-reference referent see what's going on.

is there set of gdb macros, or more advanced version of gdb can make stuff easier see?

there's no way list elements in stl container.

yes there is, if you're using gdb 7 , recent gcc last 4 years or should have python pretty printers available show contents of containers, smart pointers , other standard library types. see answer @ https://stackoverflow.com/a/15329434/981959

you can write own python printers non-standard types, such boost::shared_ptr

is there set of gdb macros, or more advanced version of gdb can make stuff easier see?

there macros useful 5 years ago, there's no need them it's build in gdb , gcc. think answer question "yes, there's more advanced gdb, have tried upgrading?"


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -