Back to main index

gdb C++ STL Support

Read about gdb STL support here
Check-out the latest Python libstdc++ printers to a place on your machine.

cd ~/Downloads
svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
sudo mkdir /opt/gdb_printers
sudo mv python /opt/gdb_printers/
sudo chown -Rv root:root /opt/gdb_printers/
ll /opt/gdb_printers/python

cd ~
cat > .gdbinit << EOF
python
import sys
sys.path.insert(0, '/opt/gdb_printers/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
EOF

Use command print in gdb console.


Back to main index