From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18191 invoked by alias); 9 Sep 2009 16:42:23 -0000 Received: (qmail 17998 invoked by uid 22791); 9 Sep 2009 16:42:21 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Sep 2009 16:42:17 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KPP00C00Q6QFC00@i_mtaout2.012.net.il>; Wed, 09 Sep 2009 19:42:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.50.163]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KPP0001UQECBFJ0@i_mtaout2.012.net.il>; Wed, 09 Sep 2009 19:42:13 +0300 (IDT) Date: Wed, 09 Sep 2009 16:42:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Save the history by default In-reply-to: <20090908203645.GA16820@host0.dyn.jankratochvil.net> To: Jan Kratochvil Cc: gdb@sourceware.org, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <837hw82hsc.fsf@gnu.org> References: <20090908200537.GA14676@host0.dyn.jankratochvil.net> <83fxax2num.fsf@gnu.org> <20090908203645.GA16820@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/msg00249.txt.bz2 > Date: Tue, 8 Sep 2009 22:36:45 +0200 > From: Jan Kratochvil > Cc: gdb@sourceware.org, gdb-patches@sourceware.org > > > How about trying both, like we do with .gdbinit? > > .gdbinit is being only read, multiple such files can be read. > > History file should be (also) written to. History file should never be > readonly. I didn't mean to use more than a single history file. What I meant was to look for that file in both places, and use the first one you find. > Formerly I had the patch below (this mail is not a submit for approval). > Modulo some stat() vs. access() it may be what you suggest? Looks like it, yes. > Still I find such behavior too complicated to be convenient and > therefore useful for this case. One will get rather surprised why > randomly this or that time (s)he has or does not have the history > available. How could that happen? If the file will be found with your suggested code, it will certainly be found with what I suggest. Or am I missing something?