Correct libthreadb register access for 64-bit sparc.
authorDavid S. Miller <davem@davemloft.net>
Sat, 6 Oct 2012 04:22:41 +0000 (21:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Oct 2012 04:22:41 +0000 (21:22 -0700)
[BZ #14568]
* sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
(DB_THREAD_SELF): Use constants for the register offsets.  Correct
the case of a 64-bit debugger with a 32-bit inferior.

NEWS
nptl/ChangeLog
nptl/sysdeps/sparc/tls.h

diff --git a/NEWS b/NEWS
index ce3e360..811a1f1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,13 +9,13 @@ Version 2.17
 
 * The following bugs are resolved with this release:
 
-  1349, 3479, 5044, 5298, 5400, 6530, 6778, 6808, 9685, 9914, 10014,
-  10038, 10631, 11438, 11607, 13412, 13542, 13629, 13679, 13696, 13717,
-  13741, 13939, 13966, 14042, 14090, 14150, 14151, 14154, 14157, 14166,
-  14173, 14195, 14237, 14251, 14252, 14283, 14298, 14303, 14307, 14328,
-  14331, 14336, 14337, 14347, 14349, 14376, 14417, 14459, 14476, 14477,
-  14505, 14510, 14516, 14518, 14519, 14530, 14532, 14538, 14543, 14544,
-  14545, 14557, 14562, 14576, 14579, 14583, 14587, 14621, 14638, 14645,
+  1349, 3479, 5044, 5298, 5400, 6530, 6778, 6808, 9685, 9914, 10014, 10038,
+  10631, 11438, 11607, 13412, 13542, 13629, 13679, 13696, 13717, 13741,
+  13939, 13966, 14042, 14090, 14150, 14151, 14154, 14157, 14166, 14173,
+  14195, 14237, 14251, 14252, 14283, 14298, 14303, 14307, 14328, 14331,
+  14336, 14337, 14347, 14349, 14376, 14417, 14459, 14476, 14477, 14505,
+  14510, 14516, 14518, 14519, 14530, 14532, 14538, 14543, 14544, 14545,
+  14557, 14562, 14568, 14576, 14579, 14583, 14587, 14621, 14638, 14645,
   14648.
 
 * Support for STT_GNU_IFUNC symbols added for s390 and s390x.
index 78b1b93..17a36e8 100644 (file)
@@ -1,3 +1,10 @@
+2012-10-05  David S. Miller  <davem@davemloft.net>
+
+       [BZ #14568]
+       * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
+       (DB_THREAD_SELF): Use constants for the register offsets.  Correct
+       the case of a 64-bit debugger with a 32-bit inferior.
+
 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #14557]
index 61cb09f..cfc9d96 100644 (file)
@@ -117,9 +117,9 @@ register struct pthread *__thread_self __asm__("%g7");
 #define THREAD_SELF  __thread_self
 
 /* Magic for libthread_db to know how to do THREAD_SELF.  */
-# define DB_THREAD_SELF_INCLUDE <sys/ucontext.h>
 # define DB_THREAD_SELF \
-  REGISTER (32, 32, REG_G7 * 4, 0) REGISTER (64, 64, REG_G7 * 8, 0)
+  REGISTER (32, 32, 10 * 4, 0) \
+  REGISTER (64, __WORDSIZE, (6 * 8) + (__WORDSIZE==64?0:4), 0)
 
 /* Access to data in the thread descriptor is easy.  */
 #define THREAD_GETMEM(descr, member) \