【发布时间】:2014-10-02 02:26:39
【问题描述】:
我是 GDB 新手,无法获取命令历史记录(自动完成/向上箭头指向旧命令有效)。
在我的根目录下,我有一个 .gbd_init 文件(我的工作目录中也有一个相同的文件):
set history save
set history filename ~/.gbd_history
set history on
set history expansion on
我的根目录下还有一个空的 .gbd_history 文件。
在 GBD 的“演出历史”中给出:
(gdb) show history
expansion: History expansion on command input is on.
filename: The filename in which to record the command history is
"/home/jenny/C_Programs/CS575_Algorithms/HW3/Problem1/.gdb_history".
save: Saving of the history record on exit is on.
size: The size of the command history is unlimited.
(gdb)
但是 GBD 命令“显示命令”什么也没产生,向上箭头和制表符也不做任何事情。
.gbd_history 文件存在但为空。
jenny@jennys-virtual-machine ~/C_Programs/CS575_Algorithms/HW3/Problem1 $ ls -ls .gbd*
0 -rwxrwxrwx 1 jenny jenny 0 Oct 1 22:16 .gbd_history
4 -rwxrwxrwx 1 jenny jenny 94 Oct 1 22:01 .gbdinit
我错过了什么?
感谢您的帮助。每个命令的输入都很快变老了。
珍妮
【问题讨论】: