aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-03-17 13:55:56 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-03-17 13:55:56 -0400
commit1afaf9f42fe201872d758214beceff85325a988a (patch)
tree5ef4130cf120ef753a2c20753ff556bbc3475054 /gdb
parentaac12e2497a42b47223680ab1b5924137de77c9a (diff)
downloadgdb-1afaf9f42fe201872d758214beceff85325a988a.zip
gdb-1afaf9f42fe201872d758214beceff85325a988a.tar.gz
gdb-1afaf9f42fe201872d758214beceff85325a988a.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/i386-darwin-nat.c4
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