This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v1.99 3/6] amd64-linux-nat: Use ptid from regcache instead of inferior_ptid
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Sat, 11 Mar 2017 12:03:51 -0500
- Subject: [PATCH v1.99 3/6] amd64-linux-nat: Use ptid from regcache instead of inferior_ptid
- Authentication-results: sourceware.org; auth=none
- References: <20170311170354.18468-1-simon.marchi@polymtl.ca>
gdb/ChangeLog:
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
amd64_linux_fetch_inferior_registers): Use regcache->ptid
instead of inferior_ptid.
---
gdb/amd64-linux-nat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 4a429ec2a1..d24c028d21 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))
{
--
2.12.0