public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Maciej W. Rozycki" <macro@embecosm.com>, gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>, Tom Tromey <tom@tromey.com>,
	Simon Sobisch <simonsobisch@web.de>
Subject: Re: [PATCH v7 2/4] GDB: Allow arbitrary keywords in integer set commands
Date: Mon, 31 Oct 2022 14:48:07 -0400	[thread overview]
Message-ID: <03f4f878-6423-e905-d65c-7a4e9aa45490@polymtl.ca> (raw)
In-Reply-To: <alpine.DEB.2.20.2210290024310.19931@tpp.orcam.me.uk>



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

  parent reply	other threads:[~2022-10-31 18:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 13:53 [PATCH v7 0/4] gdb: split array and string limiting options Maciej W. Rozycki
2022-10-29 13:53 ` [PATCH v7 1/4] GDB/Python: Use None for `var_zuinteger_unlimited' value set to `unlimited' Maciej W. Rozycki
2022-10-29 15:06   ` Eli Zaretskii
2022-10-29 13:53 ` [PATCH v7 2/4] GDB: Allow arbitrary keywords in integer set commands Maciej W. Rozycki
2022-10-29 15:07   ` Eli Zaretskii
2022-10-31 18:48   ` Simon Marchi [this message]
2022-10-31 19:22     ` Simon Marchi
2022-11-24 11:38       ` Maciej W. Rozycki
2022-10-29 13:53 ` [PATCH v7 3/4] GDB: Add a character string limiting option Maciej W. Rozycki
2022-10-29 15:11   ` Eli Zaretskii
2022-10-29 13:53 ` [PATCH v7 4/4] GDB/testsuite: Expand for character string limiting options Maciej W. Rozycki

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=03f4f878-6423-e905-d65c-7a4e9aa45490@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@embecosm.com \
    --cc=simonsobisch@web.de \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).