Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC] Change boolean options to bool instead of int
Date: Mon, 16 Sep 2019 00:22:00 -0000	[thread overview]
Message-ID: <CAPTJ0XEUjU7eH7bNxT3uiHyNM7v-W5suMd6=JmbnfBocMWzrNQ@mail.gmail.com> (raw)
In-Reply-To: <ac6cf4b2-eefa-faeb-dc72-29408fdf9a43@simark.ca>

On Mon, Sep 16, 2019 at 8:10 AM Simon Marchi <simark@simark.ca> wrote:
>
> 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.

Thanks.

> 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

Oh.. thanks, will fix.

> 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.

Yeah, but I'll still have to manually fill in the variable names in
the change log :/

> 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"

Thanks, will fix.

Christian


  reply	other threads:[~2019-09-16  0:22 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
2019-09-16  0:22   ` Christian Biesinger via gdb-patches [this message]
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='CAPTJ0XEUjU7eH7bNxT3uiHyNM7v-W5suMd6=JmbnfBocMWzrNQ@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=simark@simark.ca \
    /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