This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 04/13 v2] Make linux_stop_lwp be a shared function
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 9 Oct 2014 10:52:29 +0100
- Subject: [PATCH 04/13 v2] Make linux_stop_lwp be a shared function
- Authentication-results: sourceware.org; auth=none
- References: <1412848358-9958-1-git-send-email-gbenson at redhat dot com>
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 */
--
1.7.1