Bug 16135 - manual should explain/suggest the "set history filename .gdb_history" use case explicitly
Summary: manual should explain/suggest the "set history filename .gdb_history" use cas...
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 15224
  Show dependency treegraph
 
Reported: 2013-11-07 10:34 UTC by Pedro Alves
Modified: 2013-11-07 11:02 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.