From patchwork Thu Oct 9 09:52:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 3156 Received: (qmail 22434 invoked by alias); 9 Oct 2014 09:53:01 -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 22299 invoked by uid 89); 9 Oct 2014 09:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, SPF_HELO_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; Thu, 09 Oct 2014 09:52:54 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s999qqKR013510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 9 Oct 2014 05:52:53 -0400 Received: from blade.nx (ovpn-116-100.ams2.redhat.com [10.36.116.100]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s999qpl5023453 for ; Thu, 9 Oct 2014 05:52:52 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 80AF22626C6 for ; Thu, 9 Oct 2014 10:52:48 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 04/13 v2] Make linux_stop_lwp be a shared function Date: Thu, 9 Oct 2014 10:52:29 +0100 Message-Id: <1412848358-9958-5-git-send-email-gbenson@redhat.com> In-Reply-To: <1412848358-9958-1-git-send-email-gbenson@redhat.com> References: <1412848358-9958-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes Both GDB and gdbserver had linux_stop_lwp functions with identical declarations. This commit moves these to nat/linux-nat.h to allow shared code to use the function. gdb/ChangeLog: * linux-nat.h (linux_stop_lwp): Move declaration to... * nat/linux-nat.h (linux_stop_lwp): New declaration. gdb/gdbserver/ChangeLog: * linux-low.h (linux_stop_lwp): Remove declaration. --- gdb/ChangeLog | 5 +++++ gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/linux-low.h | 2 +- gdb/linux-nat.h | 2 +- gdb/nat/linux-nat.h | 5 +++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index 11d73f3..697e0fb 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -359,7 +359,7 @@ int linux_attach_lwp (ptid_t ptid); char *linux_attach_fail_reason_string (ptid_t ptid, int err); struct lwp_info *find_lwp_pid (ptid_t ptid); -void linux_stop_lwp (struct lwp_info *lwp); +/* For linux_stop_lwp see nat/linux-nat.h. */ #ifdef HAVE_LINUX_REGSETS void initialize_regsets_info (struct regsets_info *regsets_info); diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index 0195c5a..e1edbf8 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -124,7 +124,7 @@ void linux_proc_pending_signals (int pid, sigset_t *pending, extern int lin_lwp_attach_lwp (ptid_t ptid); -extern void linux_stop_lwp (struct lwp_info *lwp); +/* For linux_stop_lwp see nat/linux-nat.h. */ /* Create a prototype generic GNU/Linux target. The client can override it with local methods. */ diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h index a2a0a98..da94f2f 100644 --- a/gdb/nat/linux-nat.h +++ b/gdb/nat/linux-nat.h @@ -45,4 +45,9 @@ extern struct lwp_info *iterate_over_lwps (ptid_t filter, iterate_over_lwps_ftype callback, void *data); +/* Cause LWP to stop. This function must be provided by the + client. */ + +extern void linux_stop_lwp (struct lwp_info *lwp); + #endif /* LINUX_NAT_H */