From f07621646892e079b4d1eec1b02e5ab03b578a5e Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 5 Oct 2012 21:22:41 -0700 Subject: Correct libthreadb register access for 64-bit sparc. [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. --- nptl/sysdeps/sparc/tls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nptl/sysdeps/sparc') diff --git a/nptl/sysdeps/sparc/tls.h b/nptl/sysdeps/sparc/tls.h index 61cb09f294..cfc9d96c67 100644 --- a/nptl/sysdeps/sparc/tls.h +++ b/nptl/sysdeps/sparc/tls.h @@ -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 # 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) \ -- cgit v1.2.3