mirror of git://sourceware.org/git/glibc.git
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.
This commit is contained in:
parent
e6d329961f
commit
0597618676
|
|
@ -32,13 +32,8 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
|
||||||
if (! ta_ok (ta))
|
if (! ta_ok (ta))
|
||||||
return TD_BADTA;
|
return TD_BADTA;
|
||||||
|
|
||||||
prgregset_t regs;
|
/* Get the %fs segment register base address for the addressed thread. */
|
||||||
if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
|
if (ps_get_thread_area (ta->ph, lwpid, FS, &th->th_unique) != 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)
|
|
||||||
return TD_ERR; /* XXX Other error value? */
|
return TD_ERR; /* XXX Other error value? */
|
||||||
|
|
||||||
/* Found it. Now complete the `td_thrhandle_t' object. */
|
/* Found it. Now complete the `td_thrhandle_t' object. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue