From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69457 invoked by alias); 14 May 2015 09:16:33 -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 69447 invoked by uid 89); 14 May 2015 09:16:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 14 May 2015 09:16:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4E9GTQS006834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 May 2015 05:16:29 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4E9GRIv009832; Thu, 14 May 2015 05:16:27 -0400 Message-ID: <555467EA.5020809@redhat.com> Date: Thu, 14 May 2015 09:16:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka , Mark Kettenis CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Fix PR gdb/16999 References: <1431555450-15493-1-git-send-email-patrick@parcs.ath.cx> <201505132224.t4DMOLg0002690@glazunov.sibelius.xs4all.nl> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00357.txt.bz2 On 05/13/2015 11:38 PM, Patrick Palka wrote: > On Wed, May 13, 2015 at 6:24 PM, Mark Kettenis wrote: >>> >>> When GDB reads a nonsensical value for the HISTSIZE environment variable >>> variable, i.e. one that is non-numeric or negative, GDB then sets its >>> history size to 0. This behavior is contrary to that of bash, which >>> defaults the history size to unlimited in such cases. >>> >>> This patch makes the behavior of invalid HISTSIZE match that of bash. >>> When we encounter an invalid HISTSIZE we now set the history size to >>> unlimited instead of 0. ... > I personally don't like GDB's behavior because 1) it's not consistent > with bash and 2) it's unforgiving: a mere typo when setting HISTSIZE > will truncate the entire history file at exit. I agree. Users can well set HISTSIZE to -1 in their ~/.bashrc to affect bash's history, and then it's very annoying that GDB ends up with no history... As we're reusing this environment variable from bash, I think the right thing to do is follow whatever bash does. (BTW, like we have GDBHISTFILE vs bash's HISTFILE, it may be good to have a GDBHISTSIZE to override HISTSIZE without affecting bash.) Thanks, Pedro Alves