]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move have_ptrace_getregset to linux-nat.c
authorYao Qi <yao.qi@linaro.org>
Mon, 1 Jun 2015 11:13:02 +0000 (12:13 +0100)
committerYao Qi <yao.qi@linaro.org>
Mon, 1 Jun 2015 11:13:02 +0000 (12:13 +0100)
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.

gdb/ChangeLog
gdb/linux-nat.c
gdb/linux-nat.h
gdb/x86-linux-nat.c
gdb/x86-linux-nat.h

index 8dd98611056ef6fde4984e80300fc53224dd50a4..2ed122d506a6502b23feb2285846da0eda018e9e 100644 (file)
@@ -1,3 +1,11 @@
+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".
index f95e76c601084ecd67abbed02890ff14aea4a6df..febee84bdd31a931bcd5da84c82de40e46899bde 100644 (file)
@@ -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;
index d935270847dd9cd9d47ce62c811f61c494f4c9f1..3d766b55131f18afde54cd39e35b4592801ffd0f 100644 (file)
@@ -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;                                                        \
index 0026d264a20ea5d08f74ae5a1f589bac29340662..5d8f7c783f87cacf267729a11436782840d2c770 100644 (file)
@@ -51,8 +51,6 @@ struct arch_lwp_info
   int debug_registers_changed;
 };
 
-/* Does the current host support PTRACE_GETREGSET?  */
-int have_ptrace_getregset = -1;
 \f
 
 /* linux_nat_new_fork hook.   */
index 7c4d87c47cc801236f5b3d0e809818820e231a05..70c207a95b025234351474205ba3cb00c36f0072 100644 (file)
@@ -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;
 \f
 
 /* Helper for ps_get_thread_area.  Sets BASE_ADDR to a pointer to