[COMMITTED,v9,2.2/6] GDB: Add missing inline documentation for `add_setshow_cmd_full'

Message ID alpine.DEB.2.20.2301182242420.7841@tpp.orcam.me.uk
State Committed
Headers
Series GDB: Add missing inline documentation for `add_setshow_cmd_full' |

Commit Message

Maciej W. Rozycki Jan. 18, 2023, 11:24 p.m. UTC
  Complement commit 1d7fe7f01b93 ("gdb: Introduce setting construct 
within cmd_list_element") and add missing description for 
`add_setshow_cmd_full'.
---
Changes from v8:

- Use proper English in the description of SET_LIST and SHOW_LIST.

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
  

Patch

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 command lists SET_LIST and SHOW_LIST.
+   THECLASS is as in add_cmd.  VAR_TYPE is the kind of thing we are
+   setting.  VAR is address of the variable being controlled by this
+   command.  If nullptr is given as VAR, then both SET_SETTING_FUNC and
+   GET_SETTING_FUNC must be provided.  SET_SETTING_FUNC and GET_SETTING_FUNC
+   are callbacks used to access and modify the underlying property,
+   whatever its storage is.  SET_FUNC and SHOW_FUNC are the callback
+   functions (if non-NULL).  SET_DOC, SHOW_DOC and HELP_DOC are the
+   documentation strings.
+
+   Return the newly created set and show commands.  */
+
 template<typename T>
 static set_show_commands
 add_setshow_cmd_full (const char *name,