From patchwork Sat Jan 4 18:34:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37190 Received: (qmail 1634 invoked by alias); 4 Jan 2020 18:34:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 929 invoked by uid 89); 4 Jan 2020 18:34:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=6438 X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Jan 2020 18:34:19 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 28644E109 for ; Sat, 4 Jan 2020 12:34:18 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id noFeiWgF7W4frnoFeinK32; Sat, 04 Jan 2020 12:34:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NY/v5VZjeasQ5s67AH/MxvAL4FROw1+wmqloLdDuuyg=; b=m6rIaEUxAvVHXKQ+8UHrDlWToO DDHRtSh67iFRKdMlRRo45aWJTCMXflIhkpicUV/ZKahtiesmeZljDD0dZ+RY3XiqJO6/1s8lTVdFq FpBLTMOpWuNUbeKzU+izfBkk1; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:48942 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1inoFd-0026Lh-Vy; Sat, 04 Jan 2020 11:34:18 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 23/24] Add "usage" text to all TUI command help Date: Sat, 4 Jan 2020 11:34:09 -0700 Message-Id: <20200104183410.17114-24-tom@tromey.com> In-Reply-To: <20200104183410.17114-1-tom@tromey.com> References: <20200104183410.17114-1-tom@tromey.com> This adds "usage" text to the help for all all the TUI commands. In some cases the usage is borderline, but I tend to think being complete is preferable. 2020-01-04 Tom Tromey * tui/tui-win.c (_initialize_tui_win): Add usage text. * tui/tui-stack.c (_initialize_tui_stack): Add usage text. * tui/tui-regs.c (_initialize_tui_regs): Add usage text. * tui/tui.c (_initialize_tui): Add usage text. Change-Id: I727f7a7cfc03efa248ef98f30a18be393819e30b --- gdb/ChangeLog | 7 +++++++ gdb/tui/tui-regs.c | 4 +++- gdb/tui/tui-stack.c | 3 ++- gdb/tui/tui-win.c | 3 ++- gdb/tui/tui.c | 6 ++++-- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index ad57069968c..520fe5838aa 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -643,6 +643,8 @@ _initialize_tui_regs (void) tuicmd = tui_get_cmd_list (); cmd = add_cmd ("reg", class_tui, tui_reg_command, _("\ -TUI command to control the register window."), tuicmd); +TUI command to control the register window.\n\ +Usage: tui reg NAME\n\ +NAME is the name of the register group to display"), tuicmd); set_cmd_completer (cmd, tui_reggroup_completer); } diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 18e91882770..e42c0bda845 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -375,5 +375,6 @@ _initialize_tui_stack (void) { add_com ("update", class_tui, tui_update_command, _("Update the source window and locator to " - "display the current execution point.")); + "display the current execution point.\n\ +Usage: update")); } diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 4f9478b62a0..0d022baf25f 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1034,7 +1034,8 @@ Use \"info win\" to see the names of the windows currently being displayed.")); add_com_alias ("wh", "winheight", class_tui, 0); set_cmd_completer (cmd, winheight_completer); add_info ("win", tui_all_windows_info, - _("List of all displayed windows.")); + _("List of all displayed windows.\n\ +Usage: info win")); cmd = add_com ("focus", class_tui, tui_set_focus_command, _("\ Set focus to named window or next/prev window.\n\ Usage: focus [WINDOW-NAME | next | prev]\n\ diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index bc8c0159740..399d5916b39 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -557,9 +557,11 @@ _initialize_tui (void) tuicmd = tui_get_cmd_list (); add_cmd ("enable", class_tui, tui_enable_command, - _("Enable TUI display mode."), + _("Enable TUI display mode.\n\ +Usage: tui enable"), tuicmd); add_cmd ("disable", class_tui, tui_disable_command, - _("Disable TUI display mode."), + _("Disable TUI display mode.\n\ +Usage: tui disable"), tuicmd); }