aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ptrace.h
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2010-02-09 05:52:35 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2010-02-09 05:52:35 +0000
commit90b4621a5f550931cc32ac2fa9d1ea771a8134af (patch)
tree8f47d32e3633a44b13afaec6eeae689702bef9b1 /sys/sys/ptrace.h
parent4a97e4f030bc469269055bd8248895f29f54074d (diff)
downloadsrc-90b4621a5f550931cc32ac2fa9d1ea771a8134af.tar.gz
src-90b4621a5f550931cc32ac2fa9d1ea771a8134af.zip
Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can
obtain the memory map of the traced process. PT_VM_TIMESTAMP can be used to check if the memory map changed since the last time to avoid iterating over all the VM entries unnecesarily. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=203696
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r--sys/sys/ptrace.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 8fd52cb4451e..0d35cac78cd6 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -67,6 +67,10 @@
#define PT_SETFPREGS 36 /* set floating-point registers */
#define PT_GETDBREGS 37 /* get debugging registers */
#define PT_SETDBREGS 38 /* set debugging registers */
+
+#define PT_VM_TIMESTAMP 40 /* Get VM version (timestamp) */
+#define PT_VM_ENTRY 41 /* Get VM map (entry) */
+
#define PT_FIRSTMACH 64 /* for machine-specific requests */
#include <machine/ptrace.h> /* machine-specific requests, if any */
@@ -98,6 +102,17 @@ struct ptrace_lwpinfo {
sigset_t pl_siglist; /* LWP pending signal */
};
+/* Argument structure for PT_VM_ENTRY. */
+struct ptrace_vm_entry {
+ void *pve_cookie; /* Token used to iterate. */
+ u_long pve_start; /* Start VA of range. */
+ u_long pve_end; /* End VA of range (incl). */
+ u_long pve_offset; /* Offset in backing object. */
+ u_int pve_prot; /* Protection of memory range. */
+ u_int pve_pathlen; /* Size of path. */
+ char *pve_path; /* Path name of object. */
+};
+
#ifdef _KERNEL
#define PTRACESTOP_SC(p, td, flag) \