From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93016 invoked by alias); 22 May 2015 11:57:55 -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 93000 invoked by uid 89); 22 May 2015 11:57:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-ob0-f169.google.com Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 22 May 2015 11:57:53 +0000 Received: by obbea2 with SMTP id ea2so11261272obb.3 for ; Fri, 22 May 2015 04:57:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=JZ5vsq9wIWhiZHv9fRyiPQ9Uf6sJjGFYJaF2DrTuCOs=; b=OZonTp9q9OgJGWqlpukwwBEK9/Z9k+JZyc+bhpHixMILqYKP/QKz0rwTEcuBd+eRkF 4+K6uCHL1z2JI0XeRujx7UdqQgwRJoQdWWQfDAnD8d7Gjo2ArFAHZ5TYzrNhWKhOnyHq wVEoYCcvjM7bwxFG4964OuwhI/Q3LujaIHgHrndahKMKnN1KeBZ8fI8ilwdlvLFLn0K4 PrV4xrG2l5+a/Zb20JI4BZHlVxUhfv2S/6RD3rK24dsLEnJOGDSC+7/2Bi3GU8zv0cBZ SRKUQPfd1iS1uM3Qu24j5/8pV0m/3poWT8Zt3bJgQmZ7kECJA9MdNF9LK26BQrsk85bq tIDg== X-Gm-Message-State: ALoCoQkrAh5Y/RYF2uOHTPWwDDvE6J5MoDLP+vl0rHNgf6u2/QADs3TE7N5u/tCwYtp1JPj4A96f X-Received: by 10.202.93.4 with SMTP id r4mr6110701oib.92.1432295871686; Fri, 22 May 2015 04:57:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.243.232 with HTTP; Fri, 22 May 2015 04:57:30 -0700 (PDT) In-Reply-To: <1432293831-23599-2-git-send-email-patrick@parcs.ath.cx> References: <1432293831-23599-1-git-send-email-patrick@parcs.ath.cx> <1432293831-23599-2-git-send-email-patrick@parcs.ath.cx> From: Patrick Palka Date: Fri, 22 May 2015 11:57:00 -0000 Message-ID: Subject: Re: [PATCH 2/2] Tweak the handling of $GDBHISTSIZE edge cases [PR gdb/16999] To: "gdb-patches@sourceware.org" Cc: Patrick Palka Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-05/txt/msg00605.txt.bz2 On Fri, May 22, 2015 at 7:23 AM, Patrick Palka wrote: > When GDB reads a nonsensical value for the GDBHISTSIZE environment > variable, i.e. one that is non-numeric or negative, GDB then sets its > history size to 0. This behavior is annoying and also inconsistent > with the behavior of bash. > > This patch makes the behavior of invalid GDBHISTSIZE consistent with how > bash handles HISTSIZE. When we encounter a null or out-of-range > GDBHISTSIZE (outside of [0, INT_MAX]) we now set the history size to > unlimited instead of 0. When we encounter a non-numeric GDBHISTSIZE we > do nothing. > > gdb/ChangeLog: > > PR gdb/16999 > * top.c (init_history): For null or out-of-range GDBHISTSIZE, > set history size to unlimited. Ignore non-numeric GDBHISTSIZE. > Oops, this ChangeLog entry is not complete. I will make sure to complete it before pushing/re-posting.