Bug 16135

Summary: manual should explain/suggest the "set history filename .gdb_history" use case explicitly
Product: gdb Reporter: Pedro Alves <pedro>
Component: gdbAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 15224    

Description Pedro Alves 2013-11-07 10:34:19 UTC
Changing the default command history save location to ~/.gdb_history
is being proposed, as a prerequisite to turning on history save by
default.

However, the use case of wanting to have history in ./.gdb_history,
as GDB currently does, will be a common one.  After the default location
switch the user that wants that can put:

   set history filename .gdb_history

in his ~/.gdbinit, and that will work with old gdb's too.

(Or put that in a PROGRAM-gdb.gdb file instead of ~/.gdbinit, though
that won't work with old gdbs).

The user can also do something like:

alias mygdb=gdb -ex "set history filename .gdb_history" in her shell,
and then run mygdb instead of gdb.

As we switch the default command history location, we should also
explain explicitly how to point the history file at ./.gdb_history, as
it may not be obvious to a newcomer that that is possible, and common.
We should have suggestions for handling this use case in the manual.