# HG changeset patch # User kevinw # Date 1291812635 28800 # Node ID e7c6833aac14312eed0c1e555467ce10b331306b # Parent 940d84ca7fca64d0b496972b150b98b6cd60a093 7003789: PTRACE_GETREGS problems with SA on Linux. Summary: ifdef definitions for PTRACE_GETREGS_REQ clarified Reviewed-by: dholmes diff -r 940d84ca7fca -r e7c6833aac14 hotspot/agent/src/os/linux/ps_proc.c --- a/hotspot/agent/src/os/linux/ps_proc.c Tue Dec 07 03:15:45 2010 -0800 +++ b/hotspot/agent/src/os/linux/ps_proc.c Wed Dec 08 04:50:35 2010 -0800 @@ -121,15 +121,13 @@ #define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr) #endif -#ifdef _LP64 -#ifdef PTRACE_GETREGS64 +#if defined(_LP64) && defined(PTRACE_GETREGS64) #define PTRACE_GETREGS_REQ PTRACE_GETREGS64 +#elif defined(PTRACE_GETREGS) +#define PTRACE_GETREGS_REQ PTRACE_GETREGS +#elif defined(PT_GETREGS) +#define PTRACE_GETREGS_REQ PT_GETREGS #endif -#else -#if defined(PTRACE_GETREGS) || defined(PT_GETREGS) -#define PTRACE_GETREGS_REQ PTRACE_GETREGS -#endif -#endif /* _LP64 */ #ifdef PTRACE_GETREGS_REQ if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {