From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id D0uSMZJwd2BGXgAAWB0awg (envelope-from ) for ; Wed, 14 Apr 2021 18:45:38 -0400 Received: by simark.ca (Postfix, from userid 112) id BB8451F104; Wed, 14 Apr 2021 18:45:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1A42C1E783 for ; Wed, 14 Apr 2021 18:45:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4307F385480A; Wed, 14 Apr 2021 22:45:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4307F385480A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1618440337; bh=jlcQK9l853EUI2AgWjzkrPi16wHxGuhYWkb2TnTL6Vk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=EmKycTI2GlJ3sz72ZwEh3FVBsnZt+QVmSabjv6VhWHOQhZpJy/+XtjobfJ1qhSnbp cFX5fpJMOxL8Ir01KM2h0impvqbQPCSEIZC2+g2qJgp1MX8aoU5pNUWdz2Oq3/eo// 32UZGE0tC/etLTpEFDutu9LRk2vOvjMBAkV2gi0g= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 11DCE385803D for ; Wed, 14 Apr 2021 22:45:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 11DCE385803D Received: from Plymouth (unknown [IPv6:2a02:390:9086:0:9999:cdc9:65ae:899c]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 068338183C; Wed, 14 Apr 2021 22:45:33 +0000 (UTC) Date: Wed, 14 Apr 2021 23:45:27 +0100 To: Paul Koning Subject: Re: [PATCH 2/2] ptype: add option to use hexadecimal notation Message-ID: <20210414224527.eu2pmzica3hw5iwo@Plymouth> References: <20201231125324.14779-1-lsix@lancelotsix.com> <20201231125324.14779-3-lsix@lancelotsix.com> <8c431340-2115-c1f8-9568-620a175b35c9@FreeBSD.org> <6B65B8A7-546B-4BA3-8810-3494A1AF4278@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6B65B8A7-546B-4BA3-8810-3494A1AF4278@comcast.net> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Wed, 14 Apr 2021 22:45:34 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Tue, Apr 13, 2021 at 08:08:58PM -0400, Paul Koning wrote: > > > > On Apr 13, 2021, at 7:18 PM, John Baldwin wrote: > > > > On 12/31/20 4:53 AM, Lancelot SIX via Gdb-patches wrote: > >> This commit adds a flag to the ptype command in order to print the > >> offsets and sizes of struct members using the hexadecimal notation. The > >> 'x' flag ensures use of the hexadecimal notation while the 'X' flag > >> ensures use of the decimal notation. The default is to use decimal > >> notation. > > "X" for decimal is rather non-obvious. How about "d" instead? Usually X means uppercase hexadecimal. > > paul > > Hi, I went for the x/X since other options use the lowercase/uppercase to activate/deactivate flags (m/M or t/T). If this is more confusing than helping, I am fine using 'd' to force decimal notation. I am just a bit concerned that with those 2 distinct letters, one could expects to find two flags ('set print type hex' and 'set print type decimal'), where only one actually exists. Is this me overthinking it? Lancelot.