From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12087 invoked by alias); 15 Sep 2004 20:35:48 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11999 invoked from network); 15 Sep 2004 20:35:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 15 Sep 2004 20:35:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8FKZgoA016629 for ; Wed, 15 Sep 2004 16:35:47 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8FKZZr27450; Wed, 15 Sep 2004 16:35:36 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EDAD528D2; Wed, 15 Sep 2004 16:33:23 -0400 (EDT) Message-ID: <4148A713.3000704@gnu.org> Date: Wed, 15 Sep 2004 20:35:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Joel Brobecker Cc: gdb@sources.redhat.com Subject: Re: better name for var_integer et.al. References: <414883EC.9000500@gnu.org> <20040915181900.GW5843@gnat.com> In-Reply-To: <20040915181900.GW5843@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00130.txt.bz2 >>> /* Unsigned Integer. *VAR is an unsigned int. The user can type 0 >>> to mean "unlimited", which is stored in *VAR as UINT_MAX. */ >>> var_uinteger, > > > Ada calls such numbers "Positive". var_positive might be a good name. Or var_ordinal_number (vs cardinal number)? >>> /* Like var_uinteger but signed. *VAR is an int. The user can type 0 >>> to mean "unlimited", which is stored in *VAR as INT_MAX. */ >>> var_integer, Well, the "set backtrace limit 100" bug comes from a comparison between signed (frame->limit == -1) vs unsigned (backtrace_limit == 100) comparison which is from a var_uinteger. Using var_integer "fixes" it but lets a user enter -100. > I can't see any use for this semantics, but maybe it's due to my limited > experience. I looked at the current code, and most if not all of them > where just misuses of this kind. Some of them are really booleans (so I > suspect var_zinteger would be better), or postive numbers (so > var_positive would be better). > > I not useful, I would consider just removing it. > > >>> /* ZeroableInteger. *VAR is an int. Like Unsigned Integer except >>> that zero really means zero. */ >>> var_zinteger, > > > var_integer? (assuming we get rid of the non-zero signed integer) Andrew