about summary refs log tree commit diff
path: root/nptl_db/td_ta_map_lwp2thr.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-12-03 02:50:58 +0000
committerRoland McGrath <roland@gnu.org>2002-12-03 02:50:58 +0000
commitfa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff (patch)
tree413449448f0ca03a2a7601f58c77ce01c8927199 /nptl_db/td_ta_map_lwp2thr.c
parent2d14868942150183adaf0bc80b8ed6b70b65261e (diff)
downloadglibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.tar.gz
glibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.tar.xz
glibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.zip
* sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both
	bits of RM are cleared.
Diffstat (limited to 'nptl_db/td_ta_map_lwp2thr.c')
-rw-r--r--nptl_db/td_ta_map_lwp2thr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nptl_db/td_ta_map_lwp2thr.c b/nptl_db/td_ta_map_lwp2thr.c
index 326b9ee92a..2097194837 100644
--- a/nptl_db/td_ta_map_lwp2thr.c
+++ b/nptl_db/td_ta_map_lwp2thr.c
@@ -20,6 +20,7 @@
 
 #include "thread_dbP.h"
 #include <tls.h>
+#include <sys/reg.h>
 
 
 td_err_e
@@ -31,8 +32,12 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
   if (! ta_ok (ta))
     return TD_BADTA;
 
+  prgregset_t regs;
+  if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
+    return TD_ERR;
+
   /* Get the thread area for the addressed thread.  */
-  if (ps_get_thread_area (ta->ph, lwpid, TLS_GET_GS () >> 3, &th->th_unique)
+  if (ps_get_thread_area (ta->ph, lwpid, regs[GS] >> 3, &th->th_unique)
       != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */