This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] i386-darwin-nat: Use ptid from regcache instead of inferior_ptid


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1afaf9f42fe201872d758214beceff85325a988a

commit 1afaf9f42fe201872d758214beceff85325a988a
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri Mar 17 13:55:56 2017 -0400

    i386-darwin-nat: Use ptid from regcache instead of inferior_ptid
    
    gdb/ChangeLog:
    
    	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
    	i386_darwin_store_inferior_registers): Use ptid from regcache.

Diff:
---
 gdb/ChangeLog         | 5 +++++
 gdb/i386-darwin-nat.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 87aad91..04bd708 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 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,
 	i386bsd_store_inferior_registers): Use ptid from regcache.
 
diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
index 4bffe6d..dc7ce32 100644
--- a/gdb/i386-darwin-nat.c
+++ b/gdb/i386-darwin-nat.c
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]