Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb@sources.redhat.com
Subject: Re: better name for var_integer et.al.
Date: Wed, 15 Sep 2004 20:35:00 -0000	[thread overview]
Message-ID: <4148A713.3000704@gnu.org> (raw)
In-Reply-To: <20040915181900.GW5843@gnat.com>

>>>  /* Unsigned Integer.  *VAR is an unsigned int.  The user can type 0
>>>     to mean "unlimited", which is stored in *VAR as UINT_MAX.  */
>>>  var_uinteger,
> 
> 
> Ada calls such numbers "Positive". var_positive might be a good name.

Or var_ordinal_number (vs cardinal number)?

>>>  /* Like var_uinteger but signed.  *VAR is an int.  The user can type 0
>>>     to mean "unlimited", which is stored in *VAR as INT_MAX.  */
>>>  var_integer,

Well, the "set backtrace limit 100" bug comes from a comparison between 
signed (frame->limit == -1) vs unsigned (backtrace_limit == 100) 
comparison which is from a var_uinteger.

Using var_integer "fixes" it but lets a user enter -100.

> I can't see any use for this semantics, but maybe it's due to my limited
> experience. I looked at the current code, and most if not all of them
> where just misuses of this kind. Some of them are really booleans (so I
> suspect var_zinteger would be better), or postive numbers (so
> var_positive would be better).
> 
> I not useful, I would consider just removing it.
> 
> 
>>>  /* ZeroableInteger.  *VAR is an int.  Like Unsigned Integer except
>>>     that zero really means zero.  */
>>>  var_zinteger,
> 
> 
> var_integer? (assuming we get rid of the non-zero signed integer)

Andrew




  reply	other threads:[~2004-09-15 20:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-15 18:05 Andrew Cagney
2004-09-15 18:19 ` Joel Brobecker
2004-09-15 20:35   ` Andrew Cagney [this message]
2004-09-16  0:29     ` Joel Brobecker

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=4148A713.3000704@gnu.org \
    --to=cagney@gnu.org \
    --cc=brobecker@gnat.com \
    --cc=gdb@sources.redhat.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