summaryrefslogtreecommitdiff
path: root/gdb/gdb_ptrace.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-11-20 16:52:22 +0000
committerMark Kettenis <kettenis@gnu.org>2004-11-20 16:52:22 +0000
commitde10ed27009a9fdcc0d76717b6155bd824e71705 (patch)
treeed068bb66d745bf50c28e809697518a7737ef6c2 /gdb/gdb_ptrace.h
parente367ad0b249d28fdd5d318de6e3f71c384962f2d (diff)
downloadgdb-de10ed27009a9fdcc0d76717b6155bd824e71705.tar.gz
* gdb_ptrace.h [PTRACE_TYPE_ARG5] (ptrace): New macro.
* infptrace.c (call_ptrace): Simply call ptrace with four arguments.
Diffstat (limited to 'gdb/gdb_ptrace.h')
-rw-r--r--gdb/gdb_ptrace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdb_ptrace.h b/gdb/gdb_ptrace.h
index 62a9949d413..f060ce6fc2e 100644
--- a/gdb/gdb_ptrace.h
+++ b/gdb/gdb_ptrace.h
@@ -107,8 +107,18 @@
/* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64
or whatever it's called these days, don't provide a prototype for
ptrace. Provide one to silence compiler warnings. */
+
#ifndef HAVE_DECL_PTRACE
extern PTRACE_TYPE_RET ptrace();
#endif
+/* Some systems, at least AIX and HP-UX have a ptrace with five
+ arguments. Since we never use the fifth argument, define a ptrace
+ macro that calls the real ptrace with the last argument set to
+ zero. */
+
+#ifdef PTRACE_TYPE_ARG5
+# define ptrace(request, pid, addr, data) ptrace (request, pid, addr, data, 0)
+#endif
+
#endif /* gdb_ptrace.h */