Last active
August 18, 2017 13:58
-
-
Save kevinkreiser/38d06514525c6f26d3bf to your computer and use it in GitHub Desktop.
gdb pretty print stl containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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