This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make linux_stop_lwp be a shared function


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b2f7c7e8b7046bf3dd99e3fb7329feb962a6bc7d

commit b2f7c7e8b7046bf3dd99e3fb7329feb962a6bc7d
Author: Gary Benson <gbenson@redhat.com>
Date:   Tue Mar 24 14:05:44 2015 +0000

    Make linux_stop_lwp be a shared function
    
    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.

Diff:
---
 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/ChangeLog b/gdb/ChangeLog
index fb5d1b4..d38e828 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2015-03-24  Gary Benson  <gbenson@redhat.com>
 
+	* linux-nat.h (linux_stop_lwp): Move declaration to...
+	* nat/linux-nat.h (linux_stop_lwp): New declaration.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
 	* linux-nat.h: Include nat/linux-nat.h.
 	(iterate_over_lwps): Move declaration to nat/linux-nat.h.
 	* nat/linux-nat.h (struct lwp_info): New forward declaration.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 1badce3..0eef24e 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
 2015-03-24  Gary Benson  <gbenson@redhat.com>
 
+	* linux-low.h (linux_stop_lwp): Remove declaration.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
 	* linux-low.h: Include nat/linux-nat.h.
 	* linux-low.c (iterate_over_lwps_args): New structure.
 	(iterate_over_lwps_filter): New function.
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 2cfe140..5c52b14 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -355,7 +355,7 @@ int linux_pid_exe_is_elf_64_file (int pid, unsigned int *machine);
 int linux_attach_lwp (ptid_t ptid);
 
 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 4dd3932..d935270 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -140,7 +140,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.  */
 
 /* Stop all LWPs, synchronously.  (Any events that trigger while LWPs
    are being stopped are left pending.)  */
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index c534944..c983025 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -47,4 +47,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 */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]