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] Move have_ptrace_getregset to linux-nat.c


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

commit 433bbbf8574a04c1639c5466fd7c320b510b9512
Author: Yao Qi <yao.qi@linaro.org>
Date:   Mon Jun 1 12:13:02 2015 +0100

    Move have_ptrace_getregset to linux-nat.c
    
    I'll let arm-linux-nat.c to use PTRACE_GETREGSET if kernel supports,
    so this patch is to move have_ptrace_getregset from x86-linux-nat.c
    to linux-nat.c.
    
    gdb:
    
    2015-06-01  Yao Qi  <yao.qi@linaro.org>
    
    	* x86-linux-nat.c (have_ptrace_getregset): Move it to ...
    	* linux-nat.c: ... here.
    	* x86-linux-nat.h (have_ptrace_getregset): Move the declaration
    	to ...
    	* linux-nat.h: ... here.

Diff:
---
 gdb/ChangeLog       | 8 ++++++++
 gdb/linux-nat.c     | 3 +++
 gdb/linux-nat.h     | 3 +++
 gdb/x86-linux-nat.c | 2 --
 gdb/x86-linux-nat.h | 2 --
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8dd9861..2ed122d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 2015-06-01  Yao Qi  <yao.qi@linaro.org>
 
+	* x86-linux-nat.c (have_ptrace_getregset): Move it to ...
+	* linux-nat.c: ... here.
+	* x86-linux-nat.h (have_ptrace_getregset): Move the declaration
+	to ...
+	* linux-nat.h: ... here.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
 	* amd64-linux-nat.c: Include "nat/linux-ptrace.h".
 	* i386-linux-nat.c: Likewise.
 	* nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index f95e76c..febee84 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -163,6 +163,9 @@ blocked.  */
 #define O_LARGEFILE 0
 #endif
 
+/* Does the current host support PTRACE_GETREGSET?  */
+int have_ptrace_getregset = -1;
+
 /* The single-threaded native GNU/Linux target_ops.  We save a pointer for
    the use of the multi-threaded target.  */
 static struct target_ops *linux_ops;
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
index d935270..3d766b5 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -115,6 +115,9 @@ struct lwp_info
    native target is active.  */
 extern struct lwp_info *lwp_list;
 
+/* Does the current host support PTRACE_GETREGSET?  */
+extern int have_ptrace_getregset;
+
 /* Iterate over each active thread (light-weight process).  */
 #define ALL_LWPS(LP)							\
   for ((LP) = lwp_list;							\
diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
index 0026d26..5d8f7c7 100644
--- a/gdb/x86-linux-nat.c
+++ b/gdb/x86-linux-nat.c
@@ -51,8 +51,6 @@ struct arch_lwp_info
   int debug_registers_changed;
 };
 
-/* Does the current host support PTRACE_GETREGSET?  */
-int have_ptrace_getregset = -1;
 
 
 /* linux_nat_new_fork hook.   */
diff --git a/gdb/x86-linux-nat.h b/gdb/x86-linux-nat.h
index 7c4d87c..70c207a 100644
--- a/gdb/x86-linux-nat.h
+++ b/gdb/x86-linux-nat.h
@@ -20,8 +20,6 @@
 #ifndef X86_LINUX_NAT_H
 #define X86_LINUX_NAT_H 1
 
-/* Does the current host support PTRACE_GETREGSET?  */
-extern int have_ptrace_getregset;
 
 
 /* Helper for ps_get_thread_area.  Sets BASE_ADDR to a pointer to


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