How to recall the commands run in previous gdb session?

Daniel Jacobowitz drow@false.org
Sun Oct 29 20:49:00 GMT 2006


On Sun, Oct 29, 2006 at 02:35:38PM -0600, Peng Yu wrote:
> Hi,
> 
> In the same gdb session, I can use up or down arrow to recall commands.
> 
> But once a gdb session is start over, all the history commands are
> gone. I'm wondering if it is possible to recall those commands?

Take a look at the section on saving history in the GDB manual.

Someone else asked me about this last week.  I've been thinking about
adjusting it to use ~/.gdb_history instead of ./.gdb_history by default
and then enabling it by default.  After all, everyone seems to assume
their shell will save CLI history, why shouldn't we?

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list