Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Christian Biesinger <cbiesinger@google.com>, gdb-patches@sourceware.org
Subject: Re: [RFC] Change boolean options to bool instead of int
Date: Sun, 15 Sep 2019 23:10:00 -0000	[thread overview]
Message-ID: <ac6cf4b2-eefa-faeb-dc72-29408fdf9a43@simark.ca> (raw)
In-Reply-To: <20190915083353.33228-1-cbiesinger@google.com>

On 2019-09-15 4:33 a.m., Christian Biesinger via gdb-patches wrote:
> [Before I write a huge changelog entry for this... would this be acceptable
> in principle?]
> 
> This is for add_setshow_boolean_cmd as well as the gdb::option interface.

Hi Christian,

I don't really see any problem with doing this, it seems like the natural thing to do.

There are still some globals that are initialized with 0 or 1 instead of false or true.
You can find them with:

  $ grep 'bool .* = [01];' *.c */*.c

To generate a big ChangeLog entry like this, you can try using one of the various
scripts that try to generate a ChangeLog entry from a diff, like the one from gcc:

  https://github.com/gcc-mirror/gcc/blob/master/contrib/mklog

It might do half of the job automatically.

I opened files at random to get a feel of the patch and happened to notice this:

> diff --git a/gdb/command.h b/gdb/command.h
> index 2c608048d54..29b99333946 100644
> --- a/gdb/command.h
> +++ b/gdb/command.h
> @@ -62,8 +62,8 @@ cmd_types;
>  /* Types of "set" or "show" command.  */
>  typedef enum var_types
>    {
> -    /* "on" or "off".  *VAR is an integer which is nonzero for on,
> -       zero for off.  */
> +    /* "on" or "off".  *VAR is an bool which is true for on,
> +       false for off.  */

"is an bool" -> "is a bool"

Simon


  reply	other threads:[~2019-09-15 23:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15  8:34 Christian Biesinger via gdb-patches
2019-09-15 23:10 ` Simon Marchi [this message]
2019-09-16  0:22   ` Christian Biesinger via gdb-patches
2019-09-16 17:06     ` Simon Marchi
2019-09-15 23:29 ` Andrew Burgess
2019-09-16  3:09   ` Christian Biesinger via gdb-patches
2019-09-16  3:10     ` [PATCH v2] " Christian Biesinger via gdb-patches
2019-09-16 17:32       ` Andrew Burgess
2019-09-16 18:03       ` Simon Marchi
2019-09-17  3:23         ` Christian Biesinger via gdb-patches
2019-09-17  3:26           ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-09-17 12:43             ` Simon Marchi
2019-09-18  0:34               ` [PATCH v4] " Christian Biesinger via gdb-patches
2019-09-17  5:03           ` [PATCH v2] " Christian Biesinger via gdb-patches
2019-09-16 17:04   ` [PP?] Re: [RFC] " Simon Marchi

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=ac6cf4b2-eefa-faeb-dc72-29408fdf9a43@simark.ca \
    --to=simark@simark.ca \
    --cc=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    /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