From: Simon Marchi Date: Mon, 13 Mar 2017 22:51:39 +0000 (-0400) Subject: amd64-linux-nat: Use ptid from regcache instead of inferior_ptid X-Git-Tag: gdb-8.0-release~408 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a06fbb7b73fe55d6b9057f8154652e1ae8f883c;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f8cb9477e3a..6f25b87fcaf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-03-13 Simon Marchi + + * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers, + amd64_linux_fetch_inferior_registers): Use regcache->ptid + instead of inferior_ptid. + 2017-03-13 Simon Marchi * target.c (target_fetch_registers, target_store_registers): Add diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 4a429ec2a16..d24c028d215 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)) {