path: root/sys/sys/ptrace.h
diff options
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-08-15 05:25:06 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-08-15 05:25:06 +0000
commit1c843354aaeddb57f4be11a2cd5eeb3278265a03 (patch)
tree6290146a54abb5f571d622ed83197b37076b3bc8 /sys/sys/ptrace.h
parent3e1b578a28a89dd4313cf444ff857d9317b2cd38 (diff)
Add or finish support for machine dependent ptrace requests. When we
check for permissions, do it for all requests, not the known requests. Later when we actually service the request we deal with the invalid requests we previously caught earlier. This commit changes the behaviour of the ptrace(2) interface for boundary cases such as an unknown request without proper permissions. Previously we would return EINVAL. Now we return EBUSY or EPERM. Platforms need to define __HAVE_PTRACE_MACHDEP when they have MD requests. This makes the prototype of cpu_ptrace() visible and introduces a call to this function for all requests greater or equal to PT_FIRSTMACH. Silence on: audit
Notes: svn path=/head/; revision=118932
Diffstat (limited to 'sys/sys/ptrace.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 09d874284924..ef7262a67661 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -81,6 +81,10 @@ struct ptrace_io_desc {
int ptrace_set_pc(struct thread *_td, unsigned long _addr);
int ptrace_single_step(struct thread *_td);
+int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data);
* These are prototypes for functions that implement some of the
* debugging functionality exported by procfs / linprocfs and by the