aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/proc-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/proc-service.c')
-rw-r--r--gdb/gdbserver/proc-service.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/gdbserver/proc-service.c b/gdb/gdbserver/proc-service.c
index 5a6dc4e..dcaf013 100644
--- a/gdb/gdbserver/proc-service.c
+++ b/gdb/gdbserver/proc-service.c
@@ -101,20 +101,20 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
{
#ifdef HAVE_REGSETS
struct lwp_info *lwp;
- struct thread_info *reg_inferior, *save_inferior;
+ struct thread_info *reg_thread, *saved_thread;
struct regcache *regcache;
lwp = find_lwp_pid (pid_to_ptid (lwpid));
if (lwp == NULL)
return PS_ERR;
- reg_inferior = get_lwp_thread (lwp);
- save_inferior = current_inferior;
- current_inferior = reg_inferior;
- regcache = get_thread_regcache (current_inferior, 1);
+ reg_thread = get_lwp_thread (lwp);
+ saved_thread = current_thread;
+ current_thread = reg_thread;
+ regcache = get_thread_regcache (current_thread, 1);
gregset_info ()->fill_function (regcache, gregset);
- current_inferior = save_inferior;
+ current_thread = saved_thread;
return PS_OK;
#else
return PS_ERR;
@@ -157,5 +157,5 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
pid_t
ps_getpid (gdb_ps_prochandle_t ph)
{
- return pid_of (current_inferior);
+ return pid_of (current_thread);
}