This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 17 Mar 2017 17:56:57 -0000
- Subject: [binutils-gdb] arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4ac4bb6ad5ead16be5ca6996a3e325c26ddf71da
commit 4ac4bb6ad5ead16be5ca6996a3e325c26ddf71da
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Fri Mar 17 13:55:49 2017 -0400
arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid
gdb/ChangeLog:
* arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
store_vfp_regs): Use ptid from regcache.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/arm-linux-nat.c | 16 ++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca7a49e..bcc2cbc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
+ store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
+ store_vfp_regs): Use ptid from regcache.
+
2017-03-17 Pedro Alves <palves@redhat.com>
PR remote/21188
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index c8474a9..ad3085a 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -76,7 +76,7 @@ fetch_fpregs (struct regcache *regcache)
gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
/* Read the floating point state. */
if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -113,7 +113,7 @@ store_fpregs (const struct regcache *regcache)
gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
/* Read the floating point state. */
if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -167,7 +167,7 @@ fetch_regs (struct regcache *regcache)
elf_gregset_t regs;
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
if (have_ptrace_getregset == TRIBOOL_TRUE)
{
@@ -194,7 +194,7 @@ store_regs (const struct regcache *regcache)
elf_gregset_t regs;
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
/* Fetch the general registers. */
if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -242,7 +242,7 @@ fetch_wmmx_regs (struct regcache *regcache)
int ret, regno, tid;
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf);
if (ret < 0)
@@ -268,7 +268,7 @@ store_wmmx_regs (const struct regcache *regcache)
int ret, regno, tid;
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf);
if (ret < 0)
@@ -307,7 +307,7 @@ fetch_vfp_regs (struct regcache *regcache)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
if (have_ptrace_getregset == TRIBOOL_TRUE)
{
@@ -336,7 +336,7 @@ store_vfp_regs (const struct regcache *regcache)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
if (have_ptrace_getregset == TRIBOOL_TRUE)
{