From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30597 invoked by alias); 15 Sep 2018 02:55:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30548 invoked by uid 89); 15 Sep 2018 02:55:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.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.2 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.186.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Sep 2018 02:55:25 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway36.websitewelcome.com (Postfix) with ESMTP id EED19400C722E for ; Fri, 14 Sep 2018 21:00:31 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 10k0gVgk3SjJA10k0g7VKO; Fri, 14 Sep 2018 21:55:24 -0500 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=/CGSS7ndEYW1osVvPmEuRV4CMmUqo+wXzdyNsVeDFno=; b=nm5Ixy9o1dGldMtfHlcFe/7NpE T7PfHSh9n1zC9D+j1Ya5rbMbNsUZh8olweOwkdVTcz+Yaq5Jr5Ub9brgNlXNKWumAyyFwc7dVnyyu LV71O8eaSBkoWoqS5cC99oQYR; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:40784 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g10k0-000tP4-7r; Fri, 14 Sep 2018 21:55:24 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/3] Expand "show disassembler-options" output Date: Sat, 15 Sep 2018 02:55:00 -0000 Message-Id: <20180915025522.18723-2-tom@tromey.com> In-Reply-To: <20180915025522.18723-1-tom@tromey.com> References: <20180915025522.18723-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00473.txt.bz2 I typed this: (gdb) help set disassembler-options Set the disassembler options. Usage: set disassembler-options OPTION [,OPTION]... See: 'show disassembler-options' for valid option values. ... so I tried what it said and got: (gdb) show disassembler-options The current disassembler options are '' This surprised me a little, so this patch adds some text to explain the situation when an architecture does not have disassembler options. While there I noticed one more spot where gdb was not using the GNU style for metasyntactic variables. This patch fixes this as well. gdb/ChangeLog 2018-09-14 Tom Tromey * disasm.c (show_disassembler_options_sfunc): Use GNU style for metasyntactic variables. Print message if no disassembler options are available. --- gdb/ChangeLog | 6 ++++++ gdb/disasm.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/disasm.c b/gdb/disasm.c index 11793df67c0..d908af3fb43 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -1014,13 +1014,18 @@ show_disassembler_options_sfunc (struct ui_file *file, int from_tty, valid_options_and_args = gdbarch_valid_disassembler_options (gdbarch); if (valid_options_and_args == NULL) - return; + { + fputs_filtered (_("(There are no disassembler options available " + "for this architecture.)\n"), + file); + return; + } valid_options = &valid_options_and_args->options; fprintf_filtered (file, _("\n\ The following disassembler options are supported for use with the\n\ -'set disassembler-options