amd64-linux-nat: Use ptid from regcache instead of inferior_ptid
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 13 Mar 2017 22:51:39 +0000 (18:51 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 13 Mar 2017 22:51:39 +0000 (18:51 -0400)
gdb/ChangeLog:

* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
amd64_linux_fetch_inferior_registers): Use regcache->ptid
instead of inferior_ptid.

gdb/ChangeLog
gdb/amd64-linux-nat.c

index f8cb9477e3af47abe9918a71dd8ad84edf9b8d8f..6f25b87fcafadf73b385cb658d8426396c29c73d 100644 (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
index 4a429ec2a16444f1fe37b55e9172d028c294fbd1..d24c028d215581339bf856701f49c74f6d49bcaf 100644 (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))
     {
This page took 0.037298 seconds and 4 git commands to generate.