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.
To clarify, this: > One idea to maintain backwards compatibility would be to check if > ./.gdb_history, if it exists. If the history filename set actually should have read: One idea to maintain backwards compatibility would be to check if ./.gdb_history exists. If so, and if the history filename set actually ...