diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-09-24 23:33:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-09-24 23:33:35 +0000 |
commit | b64f7699cfbc970e992b327bd5247efd7b2bab18 (patch) | |
tree | c75683bfbaf67019e389df6f5fd126453be19a87 | |
parent | 5773e494b1ed96d81f16bf00249fc6420ca66979 (diff) | |
download | glibc-b64f7699cfbc970e992b327bd5247efd7b2bab18.tar.gz glibc-b64f7699cfbc970e992b327bd5247efd7b2bab18.tar.xz glibc-b64f7699cfbc970e992b327bd5247efd7b2bab18.zip |
(td_thr_tls_get_addr): Change second parameter to be the address of the link map in the inferior process.
-rw-r--r-- | linuxthreads_db/td_thr_tls_get_addr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linuxthreads_db/td_thr_tls_get_addr.c b/linuxthreads_db/td_thr_tls_get_addr.c index f6e356b339..cfe821f707 100644 --- a/linuxthreads_db/td_thr_tls_get_addr.c +++ b/linuxthreads_db/td_thr_tls_get_addr.c @@ -28,13 +28,14 @@ td_err_e td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)), - struct link_map *map __attribute__ ((unused)), + void *map_address __attribute__ ((unused)), size_t offset __attribute__ ((unused)), void **address __attribute__ ((unused))) { #if USE_TLS struct _pthread_descr_struct pds; size_t modid; + struct link_map map; union dtv pdtv; LOG ("td_thr_tls_get_addr"); @@ -44,12 +45,14 @@ td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)), th->th_ta_p->sizeof_descr) != PS_OK) return TD_ERR; /* XXX Other error value? */ - /* The module ID. */ - modid = map->l_tls_modid; + /* 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) + 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 + modid, &pdtv, - sizeof (union dtv)) != PS_OK) + if (ps_pdread (th->th_ta_p->ph, pds.p_header.data.dtvp + map.l_tls_modid, + &pdtv, sizeof (union dtv)) != PS_OK) return TD_ERR; /* XXX Other error value? */ /* It could be that the memory for this module is not allocated for |