From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11183 invoked by alias); 22 May 2013 18:08:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11131 invoked by uid 89); 22 May 2013 18:08:38 -0000 X-Spam-SWARE-Status: No, score=-8.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 18:08:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4MI8Y5f017645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 May 2013 14:08:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4MI8V86006386; Wed, 22 May 2013 14:08:32 -0400 Message-ID: <519D099F.7090101@redhat.com> Date: Wed, 22 May 2013 18:08:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Eli Zaretskii CC: mbilal@codesourcery.com, gdb-patches@sourceware.org, jan.kratochvil@redhat.com Subject: Re: [PATCH 5/7] PR gdb/15224 , Change the default set history filename to ~/.gdb_history. References: <51877A32.1030503@codesourcery.com> <51877A99.4060503@codesourcery.com> <51877B42.7@codesourcery.com> <51877BC6.6080007@codesourcery.com> <51877C76.2000509@codesourcery.com> <518A0BA8.9000703@codesourcery.com> <51936CAF.2090508@codesourcery.com> <51937A87.2030403@codesourcery.com> <83ehd85q79.fsf@gnu.org> <519CFF3D.4080001@redhat.com> <83bo82ucpv.fsf@gnu.org> In-Reply-To: <83bo82ucpv.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00853.txt.bz2 On 05/22/2013 06:49 PM, Eli Zaretskii wrote: >> Date: Wed, 22 May 2013 18:24:13 +0100 >> From: Pedro Alves >> CC: mbilal , gdb-patches@sourceware.org, >> jan.kratochvil@redhat.com >> >> At startup time, if "set history filename" hasn't been >> used (tracked with a new global flag), then check whether there's >> a $cwd/.gdb_history file, and if so, output a warning stating that >> it's no longer read by default. The warning could also >> suggest adding "set history filename .gdb_history" to .gdbinit >> to get back the old behavior. > > That's even more annoying, IMO. > > I think gratuitous backward incompatibility is evil, especially in > programs, like GDB, where there are no good facilities for > version-specific scripting. We are breaking scripts out there for no > good reason, and we aren't giving the users of those scripts _any_ > means to get their previous behavior cleanly. I understand the sentiment, but I'd rather not generalize, and look at it on a case by case basis. Scripts do have a means get the previous behavior. Simply adding this to .gdbinit: "set history filename .gdb_history" get you the old behavior back. And works the same with the older GDBs too. Note the user must already have added "set history save on" to .gdbinit in previous releases to have history saving. He'll just need to add one more line next to that. If you're talking about getting the previous behavior of not having history enabled, then the user can just add "set history save off" to .gdbinit. > But I know I'm somehow in the minority here. It's probably the age or > something. :-) 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. 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. -- Pedro Alves