[PATCH v8 2/6] GDB: Add missing inline documentation for `add_setshow_cmd_full'
Simon Marchi
simon.marchi@polymtl.ca
Thu Jan 12 18:40:52 GMT 2023
On 11/24/22 06:22, Maciej W. Rozycki wrote:
> Complement commit 1d7fe7f01b93 ("gdb: Introduce setting construct
> within cmd_list_element") and add missing description for
> `add_setshow_cmd_full'.
> ---
> New change in v8, split off from 2/4 in v7.
> ---
> gdb/cli/cli-decode.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> gdb-setshow-cmd-full-doc.diff
> Index: src/gdb/cli/cli-decode.c
> ===================================================================
> --- src.orig/gdb/cli/cli-decode.c
> +++ src/gdb/cli/cli-decode.c
> @@ -580,6 +580,18 @@ add_setshow_cmd_full_erased (const char
> return {set, show};
> }
>
> +/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
"to both the command" doesn't really make sense. I'd say "to both
command lists SET_LIST and SHOW_LIST", or "to both lists SET_LIST and
SHOW_LIST".
I see that this text comes from add_setshow_cmd_full_erased, it can be
fixed there too. Also, it would be fine to just document the duplicated
parameters in one function and refer to that in the other function.
Simon
More information about the Gdb-patches
mailing list