gdb启用history

修改用户home目录下的.gdbinit文件:

snippet.bash
[yz@bogon ~]$ vim ~/.gdbinit
set history filename ~/.gdb_history
set history save on
set history size 2000
set history remove-duplicates 1

注:

参考