Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Koning via Gdb-patches <gdb-patches@sourceware.org>
To: Lancelot SIX <lsix@lancelotsix.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] ptype: add option to use hexadecimal notation
Date: Wed, 14 Apr 2021 20:08:58 -0400	[thread overview]
Message-ID: <7D3E1F0B-692F-4ADC-89B4-D96D4C22FFC3@comcast.net> (raw)
In-Reply-To: <20210414224527.eu2pmzica3hw5iwo@Plymouth>



> On Apr 14, 2021, at 6:45 PM, Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> wrote:
> 
> On Tue, Apr 13, 2021 at 08:08:58PM -0400, Paul Koning wrote:
>> 
>> 
>>> On Apr 13, 2021, at 7:18 PM, John Baldwin <jhb@FreeBSD.org> 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.
> 
> 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.

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.  

	paul


  reply	other threads:[~2021-04-15  0:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 12:53 [PATCH 0/2][PR cli/22640] Have ptype support hex display of offsets and sizes Lancelot SIX via Gdb-patches
2020-12-31 12:53 ` [PATCH 1/2] typeprint.h: reorder struct declaration Lancelot SIX via Gdb-patches
2020-12-31 13:01   ` Lancelot SIX via Gdb-patches
2020-12-31 15:51     ` Andrew Burgess
2020-12-31 12:53 ` [PATCH 2/2] ptype: add option to use hexadecimal notation Lancelot SIX via Gdb-patches
2021-04-13 23:18   ` John Baldwin
2021-04-14  0:08     ` Paul Koning via Gdb-patches
2021-04-14 22:45       ` Lancelot SIX via Gdb-patches
2021-04-15  0:08         ` Paul Koning via Gdb-patches [this message]
2021-04-14 22:33     ` Lancelot SIX via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D3E1F0B-692F-4ADC-89B4-D96D4C22FFC3@comcast.net \
    --to=gdb-patches@sourceware.org \
    --cc=lsix@lancelotsix.com \
    --cc=paulkoning@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox