- 在home的目录下添加.gdbinit 文件
.gdbinit 的内容如下
set print pretty on
set print object on
set print static-members on
set print demangle on
set print sevenbit-string on
set print vtbl on
set print array on
set print address on
set print symbol-filename on
set print union on
set print asm-demangle on
python
import sys
sys.path.insert(0, '/usr/share/gcc/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
下面的这部分是必须的不然不会生效
python
import sys
sys.path.insert(0, '/usr/share/gcc/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
/usr/share/gcc/python 对于自己编译的gdb 的python