aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ptrace.h
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-03-16 02:40:02 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-03-16 02:40:02 +0000
commit8bc814e603c014d613e1b9be7a0b7099cfddc5ed (patch)
tree149153da8a4a3bf8a43a460521eaa222b227cdf5 /sys/sys/ptrace.h
parentfd87aacdcce8a1e7312d900f8ebdd10f79f7a6e9 (diff)
downloadsrc-8bc814e603c014d613e1b9be7a0b7099cfddc5ed.tar.gz
src-8bc814e603c014d613e1b9be7a0b7099cfddc5ed.zip
Implement PT_IO (read / write arbitrary amounts of data or text).
Submitted by: Artur Grabowski <art@{blahonga,openbsd}.org> Obtained from: OpenBSD
Notes
Notes: svn path=/head/; revision=92395
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r--sys/sys/ptrace.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 250f2e2a8777..09d874284924 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -50,6 +50,7 @@
#define PT_ATTACH 10 /* trace some running process */
#define PT_DETACH 11 /* stop tracing a process */
+#define PT_IO 12 /* do I/O to/from stopped process. */
#define PT_GETREGS 33 /* get general-purpose registers */
#define PT_SETREGS 34 /* set general-purpose registers */
@@ -61,6 +62,21 @@
#define PT_FIRSTMACH 64 /* for machine-specific requests */
#include <machine/ptrace.h> /* machine-specific requests, if any */
+struct ptrace_io_desc {
+ int piod_op; /* I/O operation */
+ void *piod_offs; /* child offset */
+ void *piod_addr; /* parent offset */
+ size_t piod_len; /* request length */
+};
+
+/*
+ * Operations in piod_op.
+ */
+#define PIOD_READ_D 1 /* Read from D space */
+#define PIOD_WRITE_D 2 /* Write to D space */
+#define PIOD_READ_I 3 /* Read from I space */
+#define PIOD_WRITE_I 4 /* Write to I space */
+
#ifdef _KERNEL
int ptrace_set_pc(struct thread *_td, unsigned long _addr);
int ptrace_single_step(struct thread *_td);