Use thread_info and inferior pointers more throughout
[deliverable/binutils-gdb.git] / gdb / regcache.c
index 536322bded892074d6665990193bdb3355e60b5a..1bc4f0de8801f586b742d1448eacdb0bf66c247a 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "inferior.h"
+#include "gdbthread.h"
 #include "target.h"
 #include "gdbarch.h"
 #include "gdbcmd.h"
@@ -390,10 +391,18 @@ get_thread_regcache (ptid_t ptid)
   return get_thread_arch_regcache (ptid, current_thread_arch);
 }
 
+/* See regcache.h.  */
+
+struct regcache *
+get_thread_regcache (thread_info *thread)
+{
+  return get_thread_regcache (thread->ptid);
+}
+
 struct regcache *
 get_current_regcache (void)
 {
-  return get_thread_regcache (inferior_ptid);
+  return get_thread_regcache (inferior_thread ());
 }
 
 /* See common/common-regcache.h.  */
@@ -466,6 +475,14 @@ registers_changed_ptid (ptid_t ptid)
     }
 }
 
+/* See regcache.h.  */
+
+void
+registers_changed_thread (thread_info *thread)
+{
+  registers_changed_ptid (thread->ptid);
+}
+
 void
 registers_changed (void)
 {
This page took 0.025381 seconds and 4 git commands to generate.