public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] GDB: Add references to erased args in cli-decode.c
@ 2023-01-18 23:39 Maciej W. Rozycki
  0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2023-01-18 23:39 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e38c6ff4fa33550f93e3bf7eecac52b3ea7379f

commit 0e38c6ff4fa33550f93e3bf7eecac52b3ea7379f
Author: Maciej W. Rozycki <macro@embecosm.com>
Date:   Wed Jan 18 23:38:50 2023 +0000

    GDB: Add references to erased args in cli-decode.c
    
    Complement commit 1d7fe7f01b93 ("gdb: Introduce setting construct within
    cmd_list_element") and commit 702991711a91 ("gdb: Have setter and getter
    callbacks for settings") and update inline documentation accordingly for
    `add_set_or_show_cmd' and `add_setshow_cmd_full_erased', documenting the
    `args' parameter and removing references to `var', `set_setting_func'
    and `get_setting_func'.
    
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

Diff:
---
 gdb/cli/cli-decode.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 72b1f31b0a6..fdc29c04f27 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -496,11 +496,8 @@ empty_func (const char *args, int from_tty, cmd_list_element *c)
    TYPE is set_cmd or show_cmd.
    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.
-   SET_SETTING_FUNC is a pointer to an optional function callback used to set
-   the setting value.
-   GET_SETTING_FUNC is a pointer to an optional function callback used to get
-   the setting value.
+   ARGS is a pre-validated type-erased reference to the variable being
+   controlled by this command.
    DOC is the documentation string.  */
 
 static struct cmd_list_element *
@@ -526,12 +523,10 @@ add_set_or_show_cmd (const char *name,
 
 /* 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.
+   setting.  ARGS is a pre-validated type-erased reference to the
+   variable being controlled by this command.  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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-18 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 23:39 [binutils-gdb] GDB: Add references to erased args in cli-decode.c Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).