From patchwork Wed Jan 18 23:24:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 63371 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 4FD1F3857835 for ; Wed, 18 Jan 2023 23:25:06 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 8E60A3858035 for ; Wed, 18 Jan 2023 23:24:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E60A3858035 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-lj1-x22c.google.com with SMTP id c3so403219ljh.1 for ; Wed, 18 Jan 2023 15:24:51 -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=xbzA00CEllzHDGDvZxcvfiysU/8qVK2NmFquZIJfONw=; b=CM3Ua5hmkc0+sYLJaMnSSwJx2br4H6eKpAQpShU8HfCImkJkCq8sNvGSWbw5woouei mgbUTaN7GTwa1vsuMaReyqr2/v+G0Dcz0CTn9NkE3GYGsOCwQoZMqgJZv++3aOfLzRNh GirZoYmwfSEGQ9pLlvELFhsaYwFtwBjypc/ZutkyHUAuPoHxtZ7VLiYlFcwFYIxY2aga /C9OayiU/ZwP58GxhE5LyN7qdFk9LTikeuWud/UR3Huu7HpvaOPWvkpZgrwKthDlbZJH f3FHHU2nJ13tn98ZGHRP3H+6B19P4UD7WNRBKdVDZybK3VxMRu8mN/w9gIZ7fyMtMZhk OznQ== 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=xbzA00CEllzHDGDvZxcvfiysU/8qVK2NmFquZIJfONw=; b=uVMQKL7JML3n3qDCnyMtcBgTrcHkLr8vjDneia2zlcx+d+yy0Vy5TbPj5EwDAoK94F EnOtQlGWEdJgp3HeBjQjvQAADw394NRDVwIpTOMrHuJkTPizwXdw/ay0zpdHpjsZHko5 zsc7gc/wgB2+qZ9Mov/Lo3ymTGJo5T2ewAVEV0uSIjccNqtVnDch3K3wykn5IRSC/oIo gS+tI3LsPBSxoQLab2tk4QrzReGVfYWTOwKfH5SSXs6B68oOBBo/C8dgUgO1sNmvtuXl 4uE7ykor0FVFx6kvvzBuUCrqHUkFD9+PQX+iOSkOXQd8zvUyT/7C6DmOcTJfV7TKubm4 delQ== X-Gm-Message-State: AFqh2kqFetX1G3ILr9Pm75n5eaeKSat6zMDzJYn5gypn6JZsDrAbaDJh JW2DTZvHuZ+G7MX4IYi3I7OzNA== X-Google-Smtp-Source: AMrXdXsF9TfDYE9h5wfilx60Mcp9e05jIMYFZ1gVW3QpQB+lSqmCCMCddkks+MMw8+mlJqAsKJSorw== X-Received: by 2002:a05:651c:610:b0:285:9c52:4374 with SMTP id k16-20020a05651c061000b002859c524374mr2076955lje.21.1674084290196; Wed, 18 Jan 2023 15:24:50 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id a1-20020a2eb541000000b002770fb5722fsm4336078ljn.123.2023.01.18.15.24.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2023 15:24:49 -0800 (PST) Date: Wed, 18 Jan 2023 23:24:47 +0000 (GMT) From: "Maciej W. Rozycki" To: Simon Marchi cc: gdb-patches@sourceware.org, Andrew Burgess , Tom Tromey , Simon Sobisch Subject: [COMMITTED PATCH v9 2.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'. --- 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 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 static set_show_commands add_setshow_cmd_full (const char *name,