From patchwork Mon Mar 30 14:20:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 5908 Received: (qmail 27014 invoked by alias); 30 Mar 2015 14:20:25 -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 26996 invoked by uid 89); 30 Mar 2015 14:20:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 30 Mar 2015 14:20:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2UEKLex022661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 30 Mar 2015 10:20:21 -0400 Received: from blade.nx (ovpn-116-118.ams2.redhat.com [10.36.116.118]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2UEKKSs013440 for ; Mon, 30 Mar 2015 10:20:20 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id A50CD264109 for ; Mon, 30 Mar 2015 15:20:19 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Remove three redundant wrapper functions in remote.c Date: Mon, 30 Mar 2015 15:20:19 +0100 Message-Id: <1427725219-21592-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes This commit removes three redundant wrapper functions in remote.c. Pushed as obvious. gdb/ChangeLog: * remote.c (remote_mourn_1): Remove function. Update all callers to use remote_mourn. (extended_remote_mourn_1): Remove function. Update all callers to use extended_remote_mourn. (extended_remote_attach_1): Remove function. Update all callers to use extended_remote_attach. --- gdb/ChangeLog | 9 +++++++++ gdb/remote.c | 33 ++++++--------------------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 31c933b..131ebf1 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -110,8 +110,6 @@ static void extended_remote_restart (void); static void extended_remote_mourn (struct target_ops *); -static void remote_mourn_1 (struct target_ops *); - static void remote_send (char **buf, long *sizeof_buf_p); static int readchar (int timeout); @@ -4471,9 +4469,9 @@ remote_disconnect (struct target_ops *target, const char *args, int from_tty) error (_("Argument given to \"disconnect\" when remotely debugging.")); /* Make sure we unpush even the extended remote targets; mourn - won't do it. So call remote_mourn_1 directly instead of + won't do it. So call remote_mourn directly instead of target_mourn_inferior. */ - remote_mourn_1 (target); + remote_mourn (target); if (from_tty) puts_filtered ("Ending remote debugging.\n"); @@ -4483,8 +4481,8 @@ remote_disconnect (struct target_ops *target, const char *args, int from_tty) be chatty about it. */ static void -extended_remote_attach_1 (struct target_ops *target, const char *args, - int from_tty) +extended_remote_attach (struct target_ops *target, const char *args, + int from_tty) { struct remote_state *rs = get_remote_state (); int pid; @@ -4596,12 +4594,6 @@ extended_remote_attach_1 (struct target_ops *target, const char *args, gdb_assert (wait_status == NULL); } -static void -extended_remote_attach (struct target_ops *ops, const char *args, int from_tty) -{ - extended_remote_attach_1 (ops, args, from_tty); -} - /* Implementation of the to_post_attach method. */ static void @@ -7920,14 +7912,7 @@ extended_remote_kill (struct target_ops *ops) } static void -remote_mourn (struct target_ops *ops) -{ - remote_mourn_1 (ops); -} - -/* Worker function for remote_mourn. */ -static void -remote_mourn_1 (struct target_ops *target) +remote_mourn (struct target_ops *target) { unpush_target (target); @@ -7936,7 +7921,7 @@ remote_mourn_1 (struct target_ops *target) } static void -extended_remote_mourn_1 (struct target_ops *target) +extended_remote_mourn (struct target_ops *target) { struct remote_state *rs = get_remote_state (); @@ -7996,12 +7981,6 @@ extended_remote_mourn_1 (struct target_ops *target) } } -static void -extended_remote_mourn (struct target_ops *ops) -{ - extended_remote_mourn_1 (ops); -} - static int extended_remote_supports_disable_randomization (struct target_ops *self) {