aboutsummaryrefslogtreecommitdiff
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
commitf1bc22da7241ea978b2ac518c3cb9fb3cb04c836 (patch)
tree25736124bf143b9e6842d5a931237b0500e5556b /gdb/gdb_ptrace.h
parente31272c3a60f748be9b91fca572af74ca0f0d111 (diff)
downloadgdb-f1bc22da7241ea978b2ac518c3cb9fb3cb04c836.zip
gdb-f1bc22da7241ea978b2ac518c3cb9fb3cb04c836.tar.gz
gdb-f1bc22da7241ea978b2ac518c3cb9fb3cb04c836.tar.bz2
* 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 62a9949..f060ce6 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 */