git-thread-debugging
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
2018-08-06  Andreas Schwab  <schwab@suse.de>

* sysdeps/riscv/nptl/tls.h (DB_THREAD_SELF): Use REGISTER instead
of CONST_THREAD_AREA.

Gbp-Pq: Topic riscv64
Gbp-Pq: Name git-thread-debugging.diff

sysdeps/riscv/nptl/tls.h

index 7745d59044559e79e9a2e095c8caed21d425b550..79383e97f1a73b5b9f2fe28a45ff191f4b6501b7 100644 (file)
@@ -99,9 +99,10 @@ typedef struct
 # define TLS_DEFINE_INIT_TP(tp, pd) \
   void *tp = (void *) (pd) + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE
 
-/* Magic for libthread_db to know how to do THREAD_SELF.  */
+/* Informs libthread_db that the thread pointer is register 4, which is used
+ * to know how to do THREAD_SELF.  */
 # define DB_THREAD_SELF \
-  CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+  REGISTER (64, 64, 4 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
 
 /* Access to data in the thread descriptor is easy.  */
 # define THREAD_GETMEM(descr, member) \