Re: [PATCH 5/7] PR gdb/15224 , Change the default set history filename to ~/.gdb_history.

Eli Zaretskii
2013-05-22T19:18:57Z

> Date: Wed, 22 May 2013 19:08:31 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: mbilal@codesourcery.com, gdb-patches@sourceware.org,
> jan.kratochvil@redhat.com
>
> I understand the sentiment, but I'd rather not generalize, and look
> at it on a case by case basis.

Since my opinions are being voted down "on a case by case basis", that
doesn't help me. I thought maybe generalizing will, because all these
incompatibilities add up to a tendency that I think is dead wrong.

> Scripts do have a means get the previous behavior. Simply adding
> this to .gdbinit:

But .gdbinit in the current directory is no longer read by default, so
I can't, not without restoring the old behavior, which does involve
using a command that will cause old GDB's to barf.

> The reasoning for changing the default is that we (Pedro/Jan/Muhammad)
> believe enabling history by default is a better default that having it
> disabled by default, as currently.

Another gratuitous incompatibility.

> Couple the fact that ".gdb_history"
> is a dot/hidden file, with enabling history saving by default, and users
> could end up with their filesystem littered with random hidden .gdb_history
> files. I think GDB shouldn't do that by default. So in order to enable
> history saving by default, we believe we should default to ~/.gdb_history
> instead first. bash also defaults to saving history under $HOME, and I'd
> think most other interactive programs/shell do so too. So it feels like
> GDB is the odd one out here.

Being the odd one out is not a reason good enough to change behavior
that was the default for a long time.