aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads_db
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-25 03:26:16 +0000
committerRoland McGrath <roland@gnu.org>2002-09-25 03:26:16 +0000
commit29514aade72d8a96937326a87bfe994f85896d94 (patch)
tree69677fda0bff76d3640a831244185e79752b8091 /linuxthreads_db
parent160bb4094514b41e70a4701235fb622c0061442b (diff)
downloadglibc-29514aade72d8a96937326a87bfe994f85896d94.zip
glibc-29514aade72d8a96937326a87bfe994f85896d94.tar.gz
glibc-29514aade72d8a96937326a87bfe994f85896d94.tar.bz2
* sysdeps/mach/hurd/Versions (ld: GLIBC_2.0): Move __libc_read,
__libc_write, __libc_lseek64, to ... (ld: GLIBC_PRIVATE): ... here.
Diffstat (limited to 'linuxthreads_db')
-rw-r--r--linuxthreads_db/ChangeLog5
-rw-r--r--linuxthreads_db/td_thr_tls_get_addr.c20
2 files changed, 15 insertions, 10 deletions
diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog
index ce40ce7..5005fac 100644
--- a/linuxthreads_db/ChangeLog
+++ b/linuxthreads_db/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-24 Roland McGrath <roland@redhat.com>
+
+ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Fetch just the
+ individual members we need, not the whole structures.
+
2002-09-24 Ulrich Drepper <drepper@redhat.com>
* td_thr_tls_get_addr.c (td_thr_tls_get_addr): Change second
diff --git a/linuxthreads_db/td_thr_tls_get_addr.c b/linuxthreads_db/td_thr_tls_get_addr.c
index cfe821f..2808e83 100644
--- a/linuxthreads_db/td_thr_tls_get_addr.c
+++ b/linuxthreads_db/td_thr_tls_get_addr.c
@@ -33,25 +33,25 @@ td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)),
void **address __attribute__ ((unused)))
{
#if USE_TLS
- struct _pthread_descr_struct pds;
size_t modid;
- struct link_map map;
- union dtv pdtv;
+ union dtv pdtv, *dtvp;
LOG ("td_thr_tls_get_addr");
- /* Get the thread descriptor. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- th->th_ta_p->sizeof_descr) != PS_OK)
+ /* Get the DTV pointer from the thread descriptor. */
+ if (ps_pdread (th->th_ta_p->ph,
+ &((struct _pthread_descr_struct *) th->th_unique)->dtv,
+ &dtvp, sizeof dtvp) != PS_OK)
return TD_ERR; /* XXX Other error value? */
- /* Get the link_map, so we gan get the module ID. */
- if (ps_pdread (th->th_ta_p->ph, map_address, &map,
- sizeof (struct link_map)) != PS_OK)
+ /* Read the module ID from the link_map. */
+ if (ps_pdread (th->th_ta_p->ph,
+ &((struct link_map *) map_address)->l_tls_modid,
+ &modid, sizeof modid) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Get the corresponding entry in the DTV. */
- if (ps_pdread (th->th_ta_p->ph, pds.p_header.data.dtvp + map.l_tls_modid,
+ if (ps_pdread (th->th_ta_p->ph, dtvp + modid,
&pdtv, sizeof (union dtv)) != PS_OK)
return TD_ERR; /* XXX Other error value? */