This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/16136] New: Make users aware of the ./.gdb_history -> ~/.gdb_history default command history file change.
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 07 Nov 2013 10:58:19 +0000
- Subject: [Bug gdb/16136] New: Make users aware of the ./.gdb_history -> ~/.gdb_history default command history file change.
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16136
Bug ID: 16136
Summary: Make users aware of the ./.gdb_history ->
~/.gdb_history default command history file change.
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: palves at redhat dot com
GDB always reads the command history file, even if history save is
off. Currently, the default history filename is ./.gdb_history. This
has been a long time default. If we switch the default to
~/.gdb_history, there'll be lots of users with lots of ./.gdb_history
files that will now silently no longer be read in.
So, there are two possible fronts that could be considered here:
- backwards compatibility
- user awareness of the change
One idea to maintain backwards compatibility would be to check if
./.gdb_history, if it exists. If the history filename set actually
points elsewhere, GDB would tell the user that history is saved in
wherever the user has set it to (~/.gdb_history by default), and ask
her whether to read/save there or to .gdb_history. A variant of this
would be to always read from ./.gdb_history if it exists, and ask
whether to save there, or to the user's configured location
(~/.gdb_history by default).
Or, we could tackle only the awareness part. We could make gdb check
if a ./.gdbinit file exists and warn if the history filename actually
points elsewhere, with a hint on how to load that history file, but
not actually load it. We have precedent for something like that in
windows-nat.c:_initialize_check_for_gdb_ini.
IMO, the former is more complexity (and possible confusion) than
necessary. I think I prefer the simpler idea of tackling only
awareness.
--
You are receiving this mail because:
You are on the CC list for the bug.