aboutsummaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorkevinw <none@none>2010-12-08 04:50:35 -0800
committerkevinw <none@none>2010-12-08 04:50:35 -0800
commitadf1bba7ee15d8fec278470c74af291add09eec1 (patch)
tree3b38ebf65ca829a1d7e4da5c0193c3c426e80997 /agent
parentc3133f57bb3a270507d76aa305c23b8f6b8c55b9 (diff)
7003789: PTRACE_GETREGS problems with SA on Linux.
Summary: ifdef definitions for PTRACE_GETREGS_REQ clarified Reviewed-by: dholmes
Diffstat (limited to 'agent')
-rw-r--r--agent/src/os/linux/ps_proc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/agent/src/os/linux/ps_proc.c b/agent/src/os/linux/ps_proc.c
index 5ad3ff7f3..73b99c500 100644
--- a/agent/src/os/linux/ps_proc.c
+++ b/agent/src/os/linux/ps_proc.c
@@ -121,15 +121,13 @@ static bool process_get_lwp_regs(struct ps_prochandle* ph, pid_t pid, struct use
#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
-#endif
-#else
-#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
+#elif defined(PTRACE_GETREGS)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS
+#elif defined(PT_GETREGS)
+#define PTRACE_GETREGS_REQ PT_GETREGS
#endif
-#endif /* _LP64 */
#ifdef PTRACE_GETREGS_REQ
if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {