[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2414 - glibc-package/trunk/debian/patches/hppa



Author: aurel32
Date: 2007-07-14 23:45:56 +0000 (Sat, 14 Jul 2007)
New Revision: 2414

Added:
   glibc-package/trunk/debian/patches/hppa/submitted-threaddb.diff
Log:
... and the patch


Added: glibc-package/trunk/debian/patches/hppa/submitted-threaddb.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/submitted-threaddb.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/submitted-threaddb.diff	2007-07-14 23:45:56 UTC (rev 2414)
@@ -0,0 +1,19 @@
+Fix the register offset for libthread_db to do THREAD_SELF properly.
+
+--- ports/sysdeps/hppa/nptl/tls.h.orig	2007-07-11 22:57:36.000000000 +0000
++++ ports/sysdeps/hppa/nptl/tls.h	2007-07-11 22:57:50.000000000 +0000
+@@ -117,10 +117,11 @@
+    	__self - 1;				\
+    })
+ 
+-/* FIXME */
+-/* Magic for libthread_db to know how to do THREAD_SELF.  */
++/* Magic for libthread_db to know how to do THREAD_SELF.
++   Our thread pointer is stored in cr27.  See asm/elf.h for the offset into
++   elf_gregset_t.  The thread descriptor is sizeof (struct pthread) away.  */
+ # define DB_THREAD_SELF \
+-  REGISTER (32, 32, 32 * 4, -sizeof (struct pthread))
++  REGISTER (32, 32, 53 * 4, -sizeof (struct pthread))
+ 
+ /* Access to data in the thread descriptor is easy.  */
+ # define THREAD_GETMEM(descr, member) \



Reply to: