From patchwork Fri Feb 23 09:52:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Metzger, Markus T" X-Patchwork-Id: 26019 Received: (qmail 63582 invoked by alias); 23 Feb 2018 09:52:55 -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 63570 invoked by uid 89); 23 Feb 2018 09:52:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga04.intel.com Received: from mga04.intel.com (HELO mga04.intel.com) (192.55.52.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Feb 2018 09:52:53 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2018 01:52:52 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 23 Feb 2018 01:52:51 -0800 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w1N9qobV010600; Fri, 23 Feb 2018 09:52:50 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id w1N9qo74016927; Fri, 23 Feb 2018 10:52:50 +0100 Received: (from mmetzger@localhost) by ulvlx001.iul.intel.com with LOCAL id w1N9qoEQ016923; Fri, 23 Feb 2018 10:52:50 +0100 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH 1/2] btrace: fix output of "set record btrace" Date: Fri, 23 Feb 2018 10:52:49 +0100 Message-Id: <1519379570-16643-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes Instead of giving a message that "set record btrace" needs a sub-command, GDB crashed. Fix it. A regression test comes with the next patch. 2018-02-23 Markus Metzger gdb/ * record-btrace.c (cmd_set_record_btrace): Print sub-commands. --- gdb/record-btrace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 2464672..bc4566c 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -2955,7 +2955,10 @@ cmd_record_btrace_start (const char *args, int from_tty) static void cmd_set_record_btrace (const char *args, int from_tty) { - cmd_show_list (set_record_btrace_cmdlist, from_tty, ""); + printf_unfiltered (_("\"set record btrace\" must be followed " + "by an apporpriate subcommand.\n")); + help_list (set_record_btrace_cmdlist, "set record btrace ", all_commands, + gdb_stdout); } /* The "show record btrace" command. */