From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1256) id 8A6573858C62; Wed, 18 Jan 2023 23:24:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A6573858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674084251; bh=xjwz6mV6HbGluXy4W8ePjgTXDFl37RODaMMR4O7NEIs=; h=From:To:Subject:Date:From; b=fqVUmB03q2EdYHxn8NxxBDjMYUjz44MtIIuWS4EIHHK4DFt4s10d0OT6ndasdUZ0c jWNlmS1zR9vs2unRRt3LzBz5W85f32xIWaALeRHLD0clJDWb8FRXThAEU+pSLMoLQg cpeXY0KwSTpY6m27XsWw+Kv2l+/PUXAY/P+xvJ8o= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Maciej W. Rozycki To: gdb-cvs@sourceware.org Subject: [binutils-gdb] GDB: Add missing inline documentation for `add_setshow_cmd_full' X-Act-Checkin: binutils-gdb X-Git-Author: Maciej W. Rozycki X-Git-Refname: refs/heads/master X-Git-Oldrev: 3cfe8022bd570e2208da8e12f2274c3b13aeb0f1 X-Git-Newrev: 439ee793446b911989defb21902829519a2a1908 Message-Id: <20230118232411.8A6573858C62@sourceware.org> Date: Wed, 18 Jan 2023 23:24:11 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D439ee793446b= 911989defb21902829519a2a1908 commit 439ee793446b911989defb21902829519a2a1908 Author: Maciej W. Rozycki Date: Wed Jan 18 23:23:00 2023 +0000 GDB: Add missing inline documentation for `add_setshow_cmd_full' =20 Complement commit 1d7fe7f01b93 ("gdb: Introduce setting construct within cmd_list_element") and add missing description for `add_setshow_cmd_full'. Diff: --- gdb/cli/cli-decode.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index c8a3b2e0ecf..72b1f31b0a6 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -580,6 +580,18 @@ add_setshow_cmd_full_erased (const char *name, return {set, show}; } =20 +/* 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_FU= NC + 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 static set_show_commands add_setshow_cmd_full (const char *name,