[parisc-linux-cvs] minor ptrace change

Richard Hirst rhirst@linuxcare.com
Thu, 15 Feb 2001 17:54:44 +0000


Willy told me this is the right way to identify a 32 bit process under
a 64 bit kernel:

diff -u -r1.10 ptrace.c
--- ptrace.c    2001/02/15 15:41:51     1.10
+++ ptrace.c    2001/02/15 17:48:07
@@ -36,12 +36,7 @@
 
 #ifdef __LP64__
 
-/* CHILD_IS_32BIT is always true for now, but once we have a 64 bit userland
- * if probably wants to be something like
- *     (child->thread.flags & PARISC_FLAG_32BIT)
- * for __LP64__.
- */
-#define CHILD_IS_32BIT 1
+#define CHILD_IS_32BIT (child->personality == PER_LINUX_32BIT)
 
 /* This function is needed to translate 32 bit pt_regs offsets in to
  * 64 bit pt_regs offsets.  For example, a 32 bit gdb under a 64 bit kernel