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.
This commit is contained in:
Simon Marchi 2017-03-13 18:51:39 -04:00 committed by Simon Marchi
parent c6386875ba
commit 6a06fbb7b7
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
* 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 <simon.marchi@polymtl.ca>
* target.c (target_fetch_registers, target_store_registers): Add

View File

@ -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))
{