From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23018 invoked by alias); 8 Sep 2009 20:20:07 -0000 Received: (qmail 22927 invoked by uid 22791); 8 Sep 2009 20:20:04 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout5.012.net.il (HELO mtaout5.012.net.il) (84.95.2.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 20:19:52 +0000 Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KPO00L005OBT500@i_mtaout5.012.net.il>; Tue, 08 Sep 2009 23:19:00 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.50.163]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KPO001ZO5RNWQZ0@i_mtaout5.012.net.il>; Tue, 08 Sep 2009 23:19:00 +0300 (IDT) Date: Tue, 08 Sep 2009 20:20:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Save the history by default In-reply-to: <20090908200537.GA14676@host0.dyn.jankratochvil.net> To: Jan Kratochvil Cc: gdb@sourceware.org, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83fxax2num.fsf@gnu.org> References: <20090908200537.GA14676@host0.dyn.jankratochvil.net> X-IsSubscribed: yes 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 X-SW-Source: 2009-09/txt/msg00225.txt.bz2 > Date: Tue, 8 Sep 2009 22:05:37 +0200 > From: Jan Kratochvil > Cc: gdb-patches@sourceware.org > > The attached patch breaks backward compatibility with reading project's > specific ./.gdb_history files. I believe if someone is using such files > (me not) (s)he can add there appropriate `set history filename' to local > `.gdbinit' there. Tried a patch defaulting to ./.gdb_history and falling back > to $HOME/.gdb_history but I find it needlessly tricky. Experienced user can > set it straightforward way according to the needs, just the default should IMO > cover the major user base. How about trying both, like we do with .gdbinit? > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -81,6 +81,8 @@ registers on ARM targets. Both ARM GNU/Linux native GDB and gdbserver > can provide these registers (requires Linux 2.6.30 or later). Remote > and simulator targets may also provide them. > > +* GDB now defaults to save the command history and using a file in $HOME. > + > * New remote packets > > qSearch:memory: > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -17722,15 +17722,15 @@ list, and where it writes the command history from this session when it > exits. You can access this list through history expansion or through > the history command editing characters listed below. This file defaults > to the value of the environment variable @code{GDBHISTFILE}, or to > -@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable > -is not set. > +@file{$HOME/.gdb_history} (@file{$HOME/_gdb_history} on MS-DOS) if this > +variable is not set. > > @cindex save command history > @kindex set history save > @item set history save > @itemx set history save on > Record command history in a file, whose name may be specified with the > -@code{set history filename} command. By default, this option is disabled. > +@code{set history filename} command. By default, this option is enabled. > > @item set history save off > Stop recording command history in a file. These two parts are okay (assuming the code is accepted). Thanks.