about summary refs log tree commit diff
path: root/nptl/sysdeps/i386/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/i386/tls.h')
-rw-r--r--nptl/sysdeps/i386/tls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 85d6473380..873467ca77 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -251,6 +251,11 @@ union user_desc_init
 	  : "i" (offsetof (struct pthread, header.self)));		      \
      __self;})
 
+/* Magic for libthread_db to know how to do THREAD_SELF.  */
+# define DB_THREAD_SELF \
+  REGISTER_THREAD_AREA (32, offsetof (struct user_regs_struct, xgs), 3) \
+  REGISTER_THREAD_AREA (64, 26 * 8, 3) /* x86-64's user_regs_struct->gs */
+
 
 /* Read member of the thread descriptor directly.  */
 # define THREAD_GETMEM(descr, member) \