From: "Maciej W. Rozycki" <macro@embecosm.com>
To: Simon Marchi <simark@simark.ca>
Cc: Simon Marchi <simon.marchi@polymtl.ca>,
gdb-patches@sourceware.org, Simon Sobisch <simonsobisch@web.de>,
Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v7 2/4] GDB: Allow arbitrary keywords in integer set commands
Date: Thu, 24 Nov 2022 11:38:06 +0000 (GMT) [thread overview]
Message-ID: <alpine.DEB.2.20.2211241123320.19931@tpp.orcam.me.uk> (raw)
In-Reply-To: <146021e6-41cb-22d3-6cec-06aed5818867@simark.ca>
On Mon, 31 Oct 2022, Simon Marchi wrote:
> >> 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
After the switch to C++ our code has already become over-indented and
overly line-wrapped and therefore hard to read. Making identifiers longer
than absolutely necessary only makes things worse in my opinion.
> > On the other hand, is there any reason why "pintegers" couldn't be
> > stored as var_uinteger, with the proper literal_def?
With `var_uinteger' there's no way to prevent values in the range of
(INT_MAX; UINT_MAX] from being used. I think implementing an explicit way
to exclude this range via a special `literal_def' entry would be an
overkill.
> I forgot: I didn't have significant comments on the code itself. Maybe
> the only strange thing is the fact that you pass the list of extra
> literals in the erased_args structure. I don't think it should be
> there, it's not something that need to be type-erased (cast to void).
I have adjusted code accordingly then. Thank you for your review.
Maciej
next prev parent reply other threads:[~2022-11-24 11:38 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
2022-10-31 19:22 ` Simon Marchi
2022-11-24 11:38 ` Maciej W. Rozycki [this message]
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=alpine.DEB.2.20.2211241123320.19931@tpp.orcam.me.uk \
--to=macro@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=simon.marchi@polymtl.ca \
--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).