Skip to content

Instantly share code, notes, and snippets.

@kevinkreiser
Last active August 18, 2017 13:58
Show Gist options
  • Save kevinkreiser/38d06514525c6f26d3bf to your computer and use it in GitHub Desktop.
Save kevinkreiser/38d06514525c6f26d3bf to your computer and use it in GitHub Desktop.
gdb pretty print stl containers
cat <<EOF > ~/.gdbinit
set history save
set history size 10000
set history filename ~/.gdb_history
define f
finish
end
document f
Step out of a function, finish it
end
python
import sys
from os.path import expanduser
home = expanduser("~")
sys.path.insert(0, home + '/.gdb_stl_pretty_print')
sys.path.insert(0, home + '/.gdb_stl_pretty_print/libstdcxx/v6')
from libstdcxx.v6.printers import register_libstdcxx_printers
#register_libstdcxx_printers (None)
end
EOF
svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python ~/.gdb_stl_pretty_print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment