aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-nat.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-03-13 18:51:39 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-03-13 18:51:39 -0400
commit6a06fbb7b73fe55d6b9057f8154652e1ae8f883c (patch)
tree94c405c2c93760e72cfd6c7bdc4c752358531c34 /gdb/amd64-linux-nat.c
parentc6386875ba57a806c896ba097afef525671de4a0 (diff)
downloadgdb-6a06fbb7b73fe55d6b9057f8154652e1ae8f883c.zip
gdb-6a06fbb7b73fe55d6b9057f8154652e1ae8f883c.tar.gz
gdb-6a06fbb7b73fe55d6b9057f8154652e1ae8f883c.tar.bz2
amd64-linux-nat: Use ptid from regcache instead of inferior_ptid
gdb/ChangeLog: * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers, amd64_linux_fetch_inferior_registers): Use regcache->ptid instead of inferior_ptid.
Diffstat (limited to 'gdb/amd64-linux-nat.c')
-rw-r--r--gdb/amd64-linux-nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 4a429ec..d24c028 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -138,9 +138,9 @@ amd64_linux_fetch_inferior_registers (struct target_ops *ops,
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
if (tid == 0)
- tid = ptid_get_pid (inferior_ptid); /* Not a threaded program. */
+ tid = ptid_get_pid (regcache_get_ptid (regcache)); /* Not a threaded program. */
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
{
@@ -217,9 +217,9 @@ amd64_linux_store_inferior_registers (struct target_ops *ops,
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- tid = ptid_get_lwp (inferior_ptid);
+ tid = ptid_get_lwp (regcache_get_ptid (regcache));
if (tid == 0)
- tid = ptid_get_pid (inferior_ptid); /* Not a threaded program. */
+ tid = ptid_get_pid (regcache_get_ptid (regcache)); /* Not a threaded program. */
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
{