aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-03-13 07:59:29 +0000
committerRoland McGrath <roland@gnu.org>2004-03-13 07:59:29 +0000
commit26301a17c2b458fcb8939da9f0920786da6a293d (patch)
tree68c38ded85b75b8209d6d020ad319c670e69de2f
parentd6f53c6f3e7741a4f8d63431b716740d15ebe431 (diff)
downloadglibc-26301a17c2b458fcb8939da9f0920786da6a293d.tar
glibc-26301a17c2b458fcb8939da9f0920786da6a293d.tar.gz
glibc-26301a17c2b458fcb8939da9f0920786da6a293d.tar.bz2
glibc-26301a17c2b458fcb8939da9f0920786da6a293d.zip
* db_info.c [TLS_DTV_AT_TP && TLS_TP_OFFSET > 0]
(_thread_db_pthread_dtvp): Define differently for this case (PowerPC).
-rw-r--r--linuxthreads_db/ChangeLog5
-rw-r--r--linuxthreads_db/td_thr_tlsbase.c10
-rw-r--r--nptl_db/ChangeLog5
3 files changed, 19 insertions, 1 deletions
diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog
index 4580537b8d..b6c2a189f7 100644
--- a/linuxthreads_db/ChangeLog
+++ b/linuxthreads_db/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-12 Roland McGrath <roland@redhat.com>
+
+ * td_thr_tlsbase.c [TLS_DTV_AT_TP && TLS_TP_OFFSET > 0]: Handle this
+ case (PowerPC) differently.
+
2003-11-25 Roland McGrath <roland@redhat.com>
* td_symbol_list.c (symbol_list_arr) [HAVE_ASM_GLOBAL_DOT_NAME]:
diff --git a/linuxthreads_db/td_thr_tlsbase.c b/linuxthreads_db/td_thr_tlsbase.c
index bcf06539e9..d3e6d366bb 100644
--- a/linuxthreads_db/td_thr_tlsbase.c
+++ b/linuxthreads_db/td_thr_tlsbase.c
@@ -1,5 +1,5 @@
/* Locate TLS data for a thread.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include "thread_dbP.h"
+#include <dl-tls.h>
/* Value used for dtv entries for which the allocation is delayed. */
# define TLS_DTV_UNALLOCATED ((void *) -1l)
@@ -38,6 +39,13 @@ td_thr_tlsbase (const td_thrhandle_t *th,
psaddr_t dtvpp = th->th_unique;
#if TLS_TCB_AT_TP
dtvpp += offsetof (struct _pthread_descr_struct, p_header.data.dtvp);
+#elif TLS_DTV_AT_TP && TLS_TP_OFFSET > 0
+/* Special case hack. Really this #if should be TLS_TCB_SIZE == 0, but
+ when untrue it's a sizeof expression, and that wouldn't fly. In this
+ flavor (PowerPC), there is no TCB containing the DTV at the TP, but
+ actually the TCB lies behind the TP, i.e. at the very end of the area
+ covered by TLS_PRE_TCB_SIZE. */
+ dtvpp += TLS_PRE_TCB_SIZE - sizeof (tcbhead_t) + offsetof (tcbhead_t, dtv);
#elif TLS_DTV_AT_TP
dtvpp += TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv);
#else
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index 1d17a76066..1331a10dfa 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-12 Roland McGrath <roland@redhat.com>
+
+ * db_info.c [TLS_DTV_AT_TP && TLS_TP_OFFSET > 0]
+ (_thread_db_pthread_dtvp): Define differently for this case (PowerPC).
+
2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
* db_info.c (REGISTER): Add bit size of thread register as second