From patchwork Sat May 5 15:39:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27121 Received: (qmail 59590 invoked by alias); 5 May 2018 15:40:11 -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 59242 invoked by uid 89); 5 May 2018 15:40:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 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=H*Ad:U*tom, *val X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.107) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 05 May 2018 15:40:09 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 24A681306E for ; Sat, 5 May 2018 10:40:08 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id EzI8fcqVyA3CSEzI8fgo1c; Sat, 05 May 2018 10:40:08 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:59928 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fEzI7-001p4w-Tf; Sat, 05 May 2018 10:40:07 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] Remove output_command_const Date: Sat, 5 May 2018 09:39:47 -0600 Message-Id: <20180505153947.16864-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fEzI7-001p4w-Tf X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:59928 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes I happened to notice that output_command_const still exists, but is not needed any more -- commands are always const-correct now. This patch removes this leftover. ChangeLog 2018-05-04 Tom Tromey * printcmd.c (output_command): Remove. (output_command_const): Rename to output_command. * valprint.h (output_command): Rename from output_command_const. * tracepoint.c (trace_dump_actions): Call output_command. --- gdb/ChangeLog | 7 +++++++ gdb/printcmd.c | 10 +--------- gdb/tracepoint.c | 2 +- gdb/valprint.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 4696373b2c..0dfea34753 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1221,16 +1221,8 @@ call_command (const char *exp, int from_tty) /* Implementation of the "output" command. */ -static void -output_command (const char *exp, int from_tty) -{ - output_command_const (exp, from_tty); -} - -/* Like output_command, but takes a const string as argument. */ - void -output_command_const (const char *exp, int from_tty) +output_command (const char *exp, int from_tty) { char format = 0; struct value *val; diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index e170d704bc..7636fdb023 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -2723,7 +2723,7 @@ trace_dump_actions (struct command_line *action, } printf_filtered ("%s = ", cmd); - output_command_const (cmd, from_tty); + output_command (cmd, from_tty); printf_filtered ("\n"); } action_exp = next_comma; diff --git a/gdb/valprint.h b/gdb/valprint.h index f005c31f87..1f62039be5 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -210,7 +210,7 @@ extern void generic_printstr (struct ui_file *stream, struct type *type, arguments passed to all command implementations, except ARGS is const. */ -extern void output_command_const (const char *args, int from_tty); +extern void output_command (const char *args, int from_tty); extern int val_print_scalar_type_p (struct type *type);