Tuesday, 17 September 2013

gdb not recording command history

gdb not recording command history

I am trying to record my command history in gdb so when I close gdb and
open it again, I can press the up arrow key and get commands from previous
sessions. I tried a solution mentioned here, but it doesn't seem to work.
Here is my .gdbinit file:
set history filename ~/.gdb_history
set history save
handle SIG34 nostop noprint pass
handle SIGHUP nostop noprint pass
The signals are handled correctly in gdb so I presume the file must be
being read correctly...
Any suggestions are appreciated!
Edit
Also I need to the gdb using sudo sometimes, would this affect the saving
/ retrieving of commands?

No comments:

Post a Comment