Re: ptrace(2) autoconf tests

Mark Kettenis
2004-08-09T21:52:58Z

Can people test this on AIX and HP-UX 10.20? I'm fairly certain this
will work, but I can't really test this myself, until I find some
10.20 installation media for my 712.

Mark

Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>

* infptrace.c (call_ptrace): Select code based on PTRACE_TYPE_ARG5
instead of FIVE_ARG_PTRACE.

Index: infptrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infptrace.c,v
retrieving revision 1.36
diff -u -p -r1.36 infptrace.c
--- infptrace.c 6 Aug 2004 20:47:25 -0000 1.36
+++ infptrace.c 9 Aug 2004 21:46:45 -0000
@@ -122,7 +122,7 @@ call_ptrace (int request, int pid, PTRAC
if (request == PT_SETTRC)
{
errno = 0;
-#if !defined (FIVE_ARG_PTRACE)
+#ifndef PTRACE_TYPE_ARG5
pt_status = ptrace (PT_SETTRC, pid, addr, data);
#else
/* Deal with HPUX 8.0 braindamage. We never use the
@@ -159,7 +159,7 @@ call_ptrace (int request, int pid, PTRAC
saved_errno = errno;
errno = 0;
#endif
-#if !defined (FIVE_ARG_PTRACE)
+#ifndef PTRACE_TYPE_ARG5
pt_status = ptrace (request, pid, addr, data);
#else
/* Deal with HPUX 8.0 braindamage. We never use the
@@ -178,7 +178,7 @@ call_ptrace (int request, int pid, PTRAC
}

-#if defined (DEBUG_PTRACE) || defined (FIVE_ARG_PTRACE)
+#if defined (DEBUG_PTRACE) || defined (PTRACE_TYPE_ARG5)
/* For the rest of the file, use an extra level of indirection */
/* This lets us breakpoint usefully on call_ptrace. */
#define ptrace call_ptrace