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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/gdbserver/proc-service.c b/gdb/gdbserver/proc-service.c
index 5b83dec..a8c29ab 100644
--- a/gdb/gdbserver/proc-service.c
+++ b/gdb/gdbserver/proc-service.c
@@ -1,5 +1,5 @@
/* libthread_db helper functions for the remote server for GDB.
- Copyright 2002, 2004
+ Copyright 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by MontaVista Software.
@@ -113,13 +113,15 @@ ps_err_e
ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
{
#ifdef HAVE_REGSETS
+ struct process_info *process;
struct thread_info *reg_inferior, *save_inferior;
- reg_inferior = (struct thread_info *) find_inferior_id (&all_threads,
- lwpid);
- if (reg_inferior == NULL)
+ process = (struct process_info *) find_inferior_id (&all_processes,
+ lwpid);
+ if (process == NULL)
return PS_ERR;
+ reg_inferior = get_process_thread (process);
save_inferior = current_inferior;
current_inferior = reg_inferior;