diff options
Diffstat (limited to 'gdb/gdbserver/proc-service.c')
-rw-r--r-- | gdb/gdbserver/proc-service.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/gdbserver/proc-service.c b/gdb/gdbserver/proc-service.c index 29d0514..3bb9194 100644 --- a/gdb/gdbserver/proc-service.c +++ b/gdb/gdbserver/proc-service.c @@ -101,6 +101,7 @@ 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 regcache *regcache; lwp = find_lwp_pid (pid_to_ptid (lwpid)); if (lwp == NULL) @@ -109,9 +110,9 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset) reg_inferior = get_lwp_thread (lwp); save_inferior = current_inferior; current_inferior = reg_inferior; - - the_target->fetch_registers (-1); - gregset_info ()->fill_function (gregset); + regcache = get_thread_regcache (current_inferior, 1); + the_target->fetch_registers (regcache, -1); + gregset_info ()->fill_function (regcache, gregset); current_inferior = save_inferior; return PS_OK; |