diff options
author | kib <kib@FreeBSD.org> | 2015-01-25 13:15:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-01-25 13:15:12 +0000 |
commit | 53cbeb6d4994968a3e406c2b08de834744559630 (patch) | |
tree | c6e56b822cbbc0ead1173d2e510dc838caf28aa5 /sys/compat/freebsd32 | |
parent | 9ddc339f8bfb9d591096aa6d52debc019b7dbd06 (diff) | |
download | FreeBSD-src-53cbeb6d4994968a3e406c2b08de834744559630.zip FreeBSD-src-53cbeb6d4994968a3e406c2b08de834744559630.tar.gz |
MFC r277322:
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 9137679..5e2c912 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3074,6 +3074,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) switch (uap->com) { case PROC_SPROTECT: + case PROC_TRACE_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3102,6 +3103,9 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) return (error); data = &x.rk; break; + case PROC_TRACE_STATUS: + data = &flags; + break; default: return (EINVAL); } @@ -3117,6 +3121,10 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) if (error == 0) error = error1; break; + case PROC_TRACE_STATUS: + if (error == 0) + error = copyout(&flags, uap->data, sizeof(flags)); + break; } return (error); } |