i386-darwin-nat: Use ptid from regcache instead of inferior_ptid
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 17 Mar 2017 17:55:56 +0000 (13:55 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 17 Mar 2017 17:55:56 +0000 (13:55 -0400)
gdb/ChangeLog:

* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
i386_darwin_store_inferior_registers): Use ptid from regcache.

gdb/ChangeLog
gdb/i386-darwin-nat.c

index 87aad911ef9b65ea09511cbe3974bf6e2305896a..04bd708c6e3e44b56870b2e31af2cbae15325474 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
+       i386_darwin_store_inferior_registers): Use ptid from regcache.
+
 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
index 4bffe6d74e35a22a85029e415a2e9a2e348e7fcb..dc7ce32d6490cdcd0838207f075bb1ba343954cc 100644 (file)
@@ -50,7 +50,7 @@ static void
 i386_darwin_fetch_inferior_registers (struct target_ops *ops,
                                      struct regcache *regcache, int regno)
 {
-  thread_t current_thread = ptid_get_tid (inferior_ptid);
+  thread_t current_thread = ptid_get_tid (regcache_get_ptid (regcache));
   int fetched = 0;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
@@ -167,7 +167,7 @@ static void
 i386_darwin_store_inferior_registers (struct target_ops *ops,
                                      struct regcache *regcache, int regno)
 {
-  thread_t current_thread = ptid_get_tid (inferior_ptid);
+  thread_t current_thread = ptid_get_tid (regcache_get_ptid (regcache));
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
 #ifdef BFD64