From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id i7aMFiWEd2CBYAAAWB0awg (envelope-from ) for ; Wed, 14 Apr 2021 20:09:09 -0400 Received: by simark.ca (Postfix, from userid 112) id 4A1001F104; Wed, 14 Apr 2021 20:09:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 AB2C71E54D for ; Wed, 14 Apr 2021 20:09:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 440BB385E007; Thu, 15 Apr 2021 00:09:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 440BB385E007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1618445348; bh=q6lLxczKUDKCQbIowl+JHenYIFJ03SKvEHIACAnilpc=; h=Subject:In-Reply-To:Date:References:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=hWxhvypMwFgrRmxGTSU07woGKoGOVWDM5xGjao1zi+Zc92fNfGy8s/ZYemH0YJI6n 2EXpPzAMG0q7IT2j/BSrf7MjcEJBJYH/Zl2tmTaHzaaZa+mtsSxAHqBjnz2yyNblPN Vwm4r8QGMFuyZYTeM8LBPPQUTYqYf3L5ozDVLbbQ= Received: from resqmta-po-08v.sys.comcast.net (resqmta-po-08v.sys.comcast.net [IPv6:2001:558:fe16:19:96:114:154:167]) by sourceware.org (Postfix) with ESMTPS id 6CF02385E007 for ; Thu, 15 Apr 2021 00:09:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6CF02385E007 Received: from resomta-po-05v.sys.comcast.net ([96.114.154.229]) by resqmta-po-08v.sys.comcast.net with ESMTP id WpGolzGUwArcZWpZAlR0Eg; Thu, 15 Apr 2021 00:09:04 +0000 Received: from pkoning.akdesign.com ([73.60.223.101]) by resomta-po-05v.sys.comcast.net with ESMTPSA id WpZ5lB0t8RqFzWpZ7lNiII; Thu, 15 Apr 2021 00:09:03 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduledrudelvddgvdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtvdenucfhrhhomheprfgruhhlucfmohhnihhnghcuoehprghulhhkohhnihhnghestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnhepvddtveejueehhfeivdetffejueffheekgfduuedtvefffeekieejleefveeuhfegnecukfhppeejfedriedtrddvvdefrddutddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepphhkohhnihhnghdrrghkuggvshhighhnrdgtohhmpdhinhgvthepjeefrdeitddrvddvfedruddtuddpmhgrihhlfhhrohhmpehprghulhhkohhnihhnghestghomhgtrghsthdrnhgvthdprhgtphhtthhopehlshhigieslhgrnhgtvghlohhtshhigidrtghomhdprhgtphhtthhopehguggsqdhprghttghhvghssehsohhurhgtvgifrghrvgdrohhrgh X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: [PATCH 2/2] ptype: add option to use hexadecimal notation In-Reply-To: <20210414224527.eu2pmzica3hw5iwo@Plymouth> Date: Wed, 14 Apr 2021 20:08:58 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <7D3E1F0B-692F-4ADC-89B4-D96D4C22FFC3@comcast.net> 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> <20210414224527.eu2pmzica3hw5iwo@Plymouth> To: Lancelot SIX X-Mailer: Apple Mail (2.3445.104.17) 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: Paul Koning via Gdb-patches Reply-To: Paul Koning Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > On Apr 14, 2021, at 6:45 PM, Lancelot SIX via Gdb-patches = wrote: >=20 > On Tue, Apr 13, 2021 at 08:08:58PM -0400, Paul Koning wrote: >>=20 >>=20 >>> On Apr 13, 2021, at 7:18 PM, John Baldwin wrote: >>>=20 >>> 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. >>=20 >> "X" for decimal is rather non-obvious. How about "d" instead? = Usually X means uppercase hexadecimal. >=20 > 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? >=20 > Lancelot. I didn't realize there's an existing pattern like that. Given that = precedent, it seems that what you're proposing is fine and matches = what's already done elsewhere. =20 paul