Spelling fix.
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index 4224d2832621a9eb52023fc6b6c33754ab7b0e26..bd4f1b2a068ec1982ce29b45afe5649c91103e56 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This module implements a sort of half target that sits between the
    machine-independent parts of GDB and the /proc interface (procfs.c)
@@ -1087,16 +1085,18 @@ ps_err_e
 ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
 {
   struct cleanup *old_chain;
+  struct regcache *regcache;
 
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  regcache = get_thread_regcache (inferior_ptid);
 
   if (target_has_execution)
-    procfs_ops.to_fetch_registers (current_regcache, -1);
+    procfs_ops.to_fetch_registers (regcache, -1);
   else
-    orig_core_ops.to_fetch_registers (current_regcache, -1);
-  fill_gregset (current_regcache, (gdb_gregset_t *) gregset, -1);
+    orig_core_ops.to_fetch_registers (regcache, -1);
+  fill_gregset (regcache, (gdb_gregset_t *) gregset, -1);
 
   do_cleanups (old_chain);
 
@@ -1110,16 +1110,18 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
             const prgregset_t gregset)
 {
   struct cleanup *old_chain;
+  struct regcache *regcache;
 
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  regcache = get_thread_regcache (inferior_ptid);
 
-  supply_gregset (current_regcache, (const gdb_gregset_t *) gregset);
+  supply_gregset (regcache, (const gdb_gregset_t *) gregset);
   if (target_has_execution)
-    procfs_ops.to_store_registers (current_regcache, -1);
+    procfs_ops.to_store_registers (regcache, -1);
   else
-    orig_core_ops.to_store_registers (current_regcache, -1);
+    orig_core_ops.to_store_registers (regcache, -1);
 
   do_cleanups (old_chain);
 
@@ -1219,16 +1221,18 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
               prfpregset_t *fpregset)
 {
   struct cleanup *old_chain;
+  struct regcache *regcache;
 
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  regcache = get_thread_regcache (inferior_ptid);
 
   if (target_has_execution)
-    procfs_ops.to_fetch_registers (current_regcache, -1);
+    procfs_ops.to_fetch_registers (regcache, -1);
   else
-    orig_core_ops.to_fetch_registers (current_regcache, -1);
-  fill_fpregset (current_regcache, (gdb_fpregset_t *) fpregset, -1);
+    orig_core_ops.to_fetch_registers (regcache, -1);
+  fill_fpregset (regcache, (gdb_fpregset_t *) fpregset, -1);
 
   do_cleanups (old_chain);
 
@@ -1242,16 +1246,18 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
               const prfpregset_t * fpregset)
 {
   struct cleanup *old_chain;
+  struct regcache *regcache;
 
   old_chain = save_inferior_ptid ();
 
   inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  regcache = get_thread_regcache (inferior_ptid);
 
-  supply_fpregset (current_regcache, (const gdb_fpregset_t *) fpregset);
+  supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset);
   if (target_has_execution)
-    procfs_ops.to_store_registers (current_regcache, -1);
+    procfs_ops.to_store_registers (regcache, -1);
   else
-    orig_core_ops.to_store_registers (current_regcache, -1);
+    orig_core_ops.to_store_registers (regcache, -1);
 
   do_cleanups (old_chain);
 
This page took 0.026288 seconds and 4 git commands to generate.