This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] More completion improvements


Kevin,

This style for the add_show_from_set() call is everywhere. As we need to
revise the creation of CLI commands anyway, this will not last long
enough for us to consider a major cleanup.  It will just go away
naturally...

Regards,
Fernando


Kevin Buettner wrote:
> 
> On Feb 18,  9:31am, Eli Zaretskii wrote:
> 
> >       * solib.c (_initialize_solib): Ditto for `solib-search-path' and
> >       `solib-absolute-prefix'.
> 
> Eli,
> 
> Your solib.c changes are approved.
> 
> I have a minor style criticism.  I would prefer to see function calls
> with an embedded assignment expression written as a separate assignment
> statement followed by the function call.  E.g, instead of writing...
> 
>   add_show_from_set
>     (c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
>                       (char *) &solib_absolute_prefix,
>                       "Set prefix for loading absolute shared library symbol files.\n\
> For other (relative) files, you can add values using `set solib-search-path'.",
>                   &setlist),
>      &showlist);
> 
> ...write this instead:
> 
>   c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
>                    (char *) &solib_absolute_prefix,
>                    "Set prefix for loading absolute shared library symbol files.\n\
> For other (relative) files, you can add values using `set solib-search-path'.",
>                   &setlist);
>   add_show_from_set (c, &showlist);
> 
> The GNU coding standards do not explicitly address this case, but they
> do address a similar case regarding if-conditions.  See:
> 
>     http://www.gnu.org/prep/standards_24.html#SEC24
> 
> Kevin

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]