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

Muhammad Bilal
2013-08-01T12:43:20Z

On 05/23/2013 12:39 AM, Pedro Alves wrote:
> On 05/22/2013 08:18 PM, Eli Zaretskii wrote:
>>> 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.
> Sorry, but simply calling changes gratuitous when I've made an
> effort to explain why I believe they're good doesn't help. :-/
>
> The idea is that enabling the feature by default will expose
> it to more users, who will benefit from it, most (educated-guessing
> here, of course) not being aware GDB presently can already use
> history from previous sessions.
>
>>> 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.
> The default has been to not save the history at all.
>
> When weighing the pros and cons, I believe the pros outweigh the cons.
>
> That's just my opinion, and I've just tried to clarify why I have it.
>
ping?