From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 3465C3854179 for ; Mon, 31 Oct 2022 18:48:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3465C3854179 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 29VIm8gg027203 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Oct 2022 14:48:13 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 29VIm8gg027203 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1667242094; bh=f6TpRhX77QLLrT//S8g43Mt9zfYvp9aPMelY3+xlEkM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=hdIOy8qBn6dt+MOPZBmXK5m31AwldkTNWeK8GFJHj2YSAguQF55oFgPBri3qyK3hX /rZNlI3qOoBlgE93uQq+OXI0xPnTp+pDsG+hgUhYSdMqY+ygB0U+YRuFBu4/hUAueM ChIpVvPNfNUOOl1B62de9t1j4ui81xQBx8pMZIew= Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 220821E11E; Mon, 31 Oct 2022 14:48:08 -0400 (EDT) Message-ID: <03f4f878-6423-e905-d65c-7a4e9aa45490@polymtl.ca> Date: Mon, 31 Oct 2022 14:48:07 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v7 2/4] GDB: Allow arbitrary keywords in integer set commands Content-Language: en-US To: "Maciej W. Rozycki" , gdb-patches@sourceware.org Cc: Andrew Burgess , Tom Tromey , Simon Sobisch References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 31 Oct 2022 18:48:08 +0000 X-Spam-Status: No, score=-3032.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/29/22 09:53, Maciej W. Rozycki wrote: > Rather than just `unlimited' allow the integer set commands (or command > options) to define arbitrary keywords for the user to use, removing > hardcoded arrangements for the `unlimited' keyword. > > Remove the confusingly named `var_zinteger', `var_zuinteger' and > `var_zuinteger_unlimited' `set'/`show' command variable types redefining > them in terms of `var_uinteger', `var_integer' and `var_pinteger', which > have the range of [0;UINT_MAX], [INT_MIN;INT_MAX], and [0;INT_MAX] each. > > Following existing practice `var_pinteger' allows extra negative values > to be used, however unlike `var_zuinteger_unlimited' any number of such > values can be defined rather than just `-1'. > > The "p" in `var_pinteger' stands for "positive", for the lack of a more > appropriate unambiguous letter, even though 0 obviously is not positive; > "n" would be confusing as to whether it stands for "non-negative" or > "negative". We don't have to restrict ourselves to a single letter. By the end of reading the commit message, I had already forgotten what the `p` stood for. Ideas: - var_non_negative_integer - var_zero_or_positive_integer - some better suggestion On the other hand, is there any reason why "pintegers" couldn't be stored as var_uinteger, with the proper literal_def? Simon