about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-06-13 07:30:47 +0000
committerRoland McGrath <roland@gnu.org>2003-06-13 07:30:47 +0000
commit05976186764b0f7065dd1bf94ba9a7daa35df65b (patch)
tree47c7da3adb6bfd356dcd2cb801ca8c28a807db9e
parente6d329961fa06384125a7c14ccc3066885f5be96 (diff)
downloadglibc-05976186764b0f7065dd1bf94ba9a7daa35df65b.tar.gz
glibc-05976186764b0f7065dd1bf94ba9a7daa35df65b.tar.xz
glibc-05976186764b0f7065dd1bf94ba9a7daa35df65b.zip
2003-06-13 Roland McGrath <roland@redhat.com>
	* sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
	constant from <sys/reg.h> to ps_get_thread_area, not register contents.
-rw-r--r--nptl/sysdeps/x86_64/td_ta_map_lwp2thr.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/nptl/sysdeps/x86_64/td_ta_map_lwp2thr.c b/nptl/sysdeps/x86_64/td_ta_map_lwp2thr.c
index 1b405549af..d49d00c277 100644
--- a/nptl/sysdeps/x86_64/td_ta_map_lwp2thr.c
+++ b/nptl/sysdeps/x86_64/td_ta_map_lwp2thr.c
@@ -32,13 +32,8 @@ 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, regs[FS] >> 3, &th->th_unique)
-      != PS_OK)
+  /* Get the %fs segment register base address for the addressed thread.  */
+  if (ps_get_thread_area (ta->ph, lwpid, FS, &th->th_unique) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   /* Found it.  Now complete the `td_thrhandle_t' object.  */