From patchwork Thu Nov 24 11:22:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 61071 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 744ED38493ED for ; Thu, 24 Nov 2022 11:22:22 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id C570838432C7 for ; Thu, 24 Nov 2022 11:22:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C570838432C7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x436.google.com with SMTP id d1so1980191wrs.12 for ; Thu, 24 Nov 2022 03:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nmsKStemC4e94Jb/OT3NbDA36+P9Ew4TYE6fvRn+p6o=; b=Jc4XCtRkRPpLJUwdzQtVDCmqW2jTl3ZZJ65v0uYWtF/BSis723kjI4R6Fn92uWXS+u oJg/bJ/T+VHyOATkuGbgg4vyP1oe/D3jBL91+fWBgXjM5KXDHewb1E5jfsBg1JM3Bukc +2BWB667oL78XQBtKyYRqV23MTtH20TYQITvpdKXl7bB6OvjfVm6Ju6Jdiygq0RWgC+c HXAtG6AKpZbI9T5hBCtQG421tqqK4Z8JgIJfKHbWaB+f1qTfiuHDNW+RJMWMSd87DVp5 CgnYKOhKtXza91jknR/wkqd5SZHkHjmzQodu4vAYo4TelJMp87EdCs3cSo4avNuwjVv+ mAgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nmsKStemC4e94Jb/OT3NbDA36+P9Ew4TYE6fvRn+p6o=; b=g+OkshDrMEFBflFOiUTsMaqNh1Fl8S7kY6Kv9na04q8a6uD5tENr2GMr3l3jTNWuKY NEu7p/GTm5IOJdAArDTsef4QEijPb+UcP6yUmdrrIOhuK1EvyM35kQ2OucF38KGZYNJT yKMzfd8hTTYty0Jko+JH2CjqZbk1chVvWauJDSVGGf0szrXssniqsrgdrY4HYWIoyR7t B3NedM2O3WczNjC4SALTv5D7tdj1TZC92ADAEYVGHsG63hNLlyUsOcr8r9q6IbGmhcLy zMZlxa/T1RDdnFjNWfoROlWWK/XjhvEbZZeeGRNf1qkf2SNJMz1pFQ20EmvHfnqynq5P 4Xvw== X-Gm-Message-State: ANoB5pkffw0/vGJhJpHuCAXmAmJTIMENkelh0YLqMjdMG6gUPNqfXadp MTKgyEwe6hIYkipzOP6VUO4YsRwccmKukRyd X-Google-Smtp-Source: AA0mqf5yX2jI+kUV6WdWHvnku+My4nyni+ciruNzizwkoowDBN8fokvd60mF++oTmeTPP+GMWCMsNQ== X-Received: by 2002:a5d:4bd2:0:b0:241:ec17:6cd8 with SMTP id l18-20020a5d4bd2000000b00241ec176cd8mr4435960wrt.108.1669288928426; Thu, 24 Nov 2022 03:22:08 -0800 (PST) Received: from tpp.orcam.me.uk (tpp.orcam.me.uk. [2001:8b0:154:0:ea6a:64ff:fe24:f2fc]) by smtp.gmail.com with ESMTPSA id g7-20020a5d5547000000b0022e653f5abbsm1007849wrw.69.2022.11.24.03.22.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 03:22:08 -0800 (PST) Date: Thu, 24 Nov 2022 11:22:07 +0000 (GMT) From: "Maciej W. Rozycki" To: gdb-patches@sourceware.org cc: Andrew Burgess , Simon Marchi , Tom Tromey , Simon Sobisch Subject: [PATCH v8 2/6] GDB: Add missing inline documentation for `add_setshow_cmd_full' In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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. + 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 static set_show_commands add_setshow_cmd_full (const char *name,