diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-01-31 15:48:37 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-01-31 15:48:37 +0000 |
commit | 76d9136b8f9434aaf3ca997511ec687e8b10847a (patch) | |
tree | 506179a22d89555e8e755d2302f1439ff413d6a2 /libpthread/linuxthreads_db/td_thr_getfpregs.c | |
parent | 132f19003af8fd28d30802b1264806dedd6e36b3 (diff) |
Sync with latest GLIBC.
Diffstat (limited to 'libpthread/linuxthreads_db/td_thr_getfpregs.c')
-rw-r--r-- | libpthread/linuxthreads_db/td_thr_getfpregs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libpthread/linuxthreads_db/td_thr_getfpregs.c b/libpthread/linuxthreads_db/td_thr_getfpregs.c index ea02760c9..31c55c876 100644 --- a/libpthread/linuxthreads_db/td_thr_getfpregs.c +++ b/libpthread/linuxthreads_db/td_thr_getfpregs.c @@ -1,5 +1,5 @@ /* Get a thread's floating-point register set. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -30,7 +30,10 @@ td_thr_getfpregs (const td_thrhandle_t *th, prfpregset_t *regset) if (th->th_unique == NULL) { - memset (regset, '\0', sizeof (*regset)); + /* No data yet. Use the main thread. */ + pid_t pid = ps_getpid (th->th_ta_p->ph); + if (ps_lgetfpregs (th->th_ta_p->ph, pid, regset) != PS_OK) + return TD_ERR; return TD_OK; } |