Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/6] Move have_ptrace_getregset to linux-nat.c
Date: Thu, 28 May 2015 14:20:00 -0000	[thread overview]
Message-ID: <1432822816-32327-3-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1432822816-32327-1-git-send-email-yao.qi@linaro.org>

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-05-28  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/linux-nat.c     | 3 +++
 gdb/linux-nat.h     | 3 +++
 gdb/x86-linux-nat.c | 2 --
 gdb/x86-linux-nat.h | 2 --
 4 files changed, 6 insertions(+), 4 deletions(-)

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;
 \f
 
 /* 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;
 \f
 
 /* Helper for ps_get_thread_area.  Sets BASE_ADDR to a pointer to
-- 
1.9.1


  parent reply	other threads:[~2015-05-28 14:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 14:20 [PATCH 0/6] Use PTRACE_GETREGSET and PTRACE_SETREGSET in arm-linux-nat.c Yao Qi
2015-05-28 14:20 ` [PATCH 3/6] Check whether kernel supports PTRACE_GETREGSET Yao Qi
2015-05-28 14:20 ` [PATCH 5/6] Fetch and store FP registers by PTRACE_{G,S}ETREGSET Yao Qi
2015-05-28 14:20 ` [PATCH 6/6] Fetch and store VFP " Yao Qi
2015-05-28 14:20 ` [PATCH 4/6] Fetch and store GP " Yao Qi
2015-05-28 18:50   ` Doug Evans
2015-05-29 13:11     ` Yao Qi
2015-05-28 14:20 ` Yao Qi [this message]
2015-05-28 14:20 ` [PATCH 1/6] Move PTRACE_GETREGSET and PTRACE_SETREGSET to nat/linux-ptrace.h Yao Qi
2015-05-29  8:10 ` [PATCH 0/6] Use PTRACE_GETREGSET and PTRACE_SETREGSET in arm-linux-nat.c Gary Benson
2015-06-01 11:17 ` Yao Qi
2015-06-02  7:57   ` Mark Wielaard
2015-06-02  9:30     ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432822816-32327-3-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox