From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107387 invoked by alias); 25 Jan 2020 07:38:57 -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 107379 invoked by uid 89); 25 Jan 2020 07:38:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Jan 2020 07:38:56 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ivG1t-0007Bc-2i; Sat, 25 Jan 2020 02:38:53 -0500 Received: from [176.228.60.248] (port=1063 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ivG1s-0007C5-GV; Sat, 25 Jan 2020 02:38:52 -0500 Date: Sat, 25 Jan 2020 11:22:00 -0000 Message-Id: <83d0b8q935.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess CC: gdb-patches@sourceware.org In-reply-to: <20200124212900.30367-1-andrew.burgess@embecosm.com> (message from Andrew Burgess on Fri, 24 Jan 2020 21:29:00 +0000) Subject: Re: [PATCH] gdb: Allow GDB to _not_ load a previous command history References: <20200124212900.30367-1-andrew.burgess@embecosm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00837.txt.bz2 > From: Andrew Burgess > Cc: Andrew Burgess > Date: Fri, 24 Jan 2020 21:29:00 +0000 > > I've updated the manual, and added some tests. > > gdb/ChangeLog: > > * top.c (write_history_p): Add comment. > (show_write_history_p): Add header comment, give a different > message when history writing is on, but the history filename is > empty. > (history_filename): Add comment. > (history_filename_empty): New function. > (show_history_filename): Add header comment, give a different > message when the filename is empty. > (init_history): Compare history_filename against nullptr, and only > read history if the filename is not empty. > (set_history_filename): Add header comment, and only make > non-empty filenames absolute. > (init_main): Make the filename argument to 'set history filename' > optional. > > gdb/doc/ChangeLog: > > * gdb.texinfo (Command History): Extend description for > GDBHISTFILE and GDBHISTSIZE, add detail about the filename for > 'set history filename' being optional. > > gdb/testsuite/ChangeLog: > > * gdb.base/default.exp: Remove test of 'set history filename'. > * gdb.base/gdbinit-history.exp: Add tests for setting the history > filename to the empty string. > * lib/gdb.exp (gdb_init): Unset environment variables GDBHISTFILE > and GDBHISTSIZE. Thanks. This should also be announced in NEWS. > @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 > +disabled. The command history will be recorded when @value{GDBN} > +exits. > > @item set history save off > -Stop recording command history in a file. > +Don't record the command history into the file specified by @code{set > +history filename} when @value{GDBN} exits. This should say that if the history file name is an empty string, that disables saving the history, even if saving it is set on.