From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22579 invoked by alias); 2 Aug 2012 08:34:14 -0000 Received: (qmail 22436 invoked by uid 22791); 2 Aug 2012 08:34:12 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Aug 2012 08:34:00 +0000 Received: by vcbfl10 with SMTP id fl10so9015344vcb.0 for ; Thu, 02 Aug 2012 01:33:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=wctf9OmuLtXlzU+C7phgRRrs4ltYsgPdLsJtCCXp/LQ=; b=c6tE4IYnhnH1xKttEPiuJ1tLOIteeG1OGv0V9ayzVkRNclt4j3tiGKgKyOKrola2nj a6maQb99C0rFZB6Wwie8aJVvltCzJyTqB6wPpWiKefgZ7VbcjkT9FxwZODoTvkkoLY/q ZD+dMt7uRArOtkea079gtHRcgxT6YFHDfsR9K06gpRryIm8GtdEmGT/fTB0EICgYlOPW gvhcK9CJHGHTPtemFWCWcI15+AvByJdvfCr2jrHhWXVTY2iFumZI+YHYpNMYj2LxIZtb Kj5gzjYoveC5b+JZ1xVI5n1IJLXXlaZr/gCmDRpWsAiOdUWVdtdUTqUfNljk2pr5npxV 2Z/A== Received: by 10.52.67.199 with SMTP id p7mr16673519vdt.126.1343896438924; Thu, 02 Aug 2012 01:33:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.67.199 with SMTP id p7mr16673511vdt.126.1343896438828; Thu, 02 Aug 2012 01:33:58 -0700 (PDT) Received: by 10.52.157.4 with HTTP; Thu, 2 Aug 2012 01:33:58 -0700 (PDT) In-Reply-To: <1343829334-3151-2-git-send-email-yao@codesourcery.com> References: <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1@cs.umd.edu> <1343829334-3151-1-git-send-email-yao@codesourcery.com> <1343829334-3151-2-git-send-email-yao@codesourcery.com> Date: Thu, 02 Aug 2012 08:34:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] var_zuinteger_unlimited and 'set listsize'. From: Doug Evans To: Yao Qi Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQnkiWq+60l9rhjDj/9OrlO+FPS+RkEDDcHHvARvYZj8mioQDA2uH09e66L54MsOrEqrT3/T9h80uqiN0Aq9XsY2O14Jw3KDtTydF1Z4YDMgMXwdtZeuSEwI02/0e1mnZ+bVZXPXwMxzL4f2t2TWzdNy6a2f4xAlPEsOs7Fkmoli8pDac6RwlOcXe3wayJQYJVmpOF5N 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: 2012-08/txt/msg00055.txt.bz2 On Wed, Aug 1, 2012 at 6:55 AM, Yao Qi wrote: > Hi, > This patch is to add new var_types 'var_zuinteger_unlimited' and > fix 'set listsize'. > > gdb: > > 2012-08-01 Yao Qi > Mark Kettenis > > * cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New. > * cli/cli-setshow.c (do_setshow_command): Handle case > 'var_zuinteger_unlimited'. > (do_setshow_command): Check the range for var_uinteger and > var_zuinteger. > * command.h (typedef enum var_types): New enum > 'var_zuinteger_unlimited'. > Declare add_setshow_zuinteger_unlimited_cmd. > * source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd. Nit: The changelog entry for source.c should mention "listsize". And the entry for do_setshow_command should also mention that it fixes the setting of var_integer and var_zinteger to allow negative values. Things are quite a mess, aren't they. Adding yet another var_foo doesn't appeal to me, but we can't break anything and being able to set both "0" and "unlimited" (expressed however) would be nice. Is there any real use-case that wants to be able to set negative values and have "0" mean unlimited? It's never (until this patch) been the case that one can set negative values to var_integer. Can we remove (or at least deprecate) var_integer? [we'd switch all existing uses to var_uinteger, the only remaining use would be the Python API] btw, you also might want to update python/py-param.c. Though py-param.c also doesn't handle var_zuinteger, and I don't mind not extending the Python API until we know we want to.