aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ptrace.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2011-01-25 10:59:21 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2011-01-25 10:59:21 +0000
commit6fa39a73278ed9cbaaaba1873e53db2c706d6029 (patch)
tree8bd4ca91acf483d0b07a7a1a8c354a245fa549b1 /sys/sys/ptrace.h
parentf1d16bd8921680db8046eb765e51a15163f9dff1 (diff)
downloadsrc-6fa39a73278ed9cbaaaba1873e53db2c706d6029.tar.gz
src-6fa39a73278ed9cbaaaba1873e53db2c706d6029.zip
Allow debugger to specify that children of the traced process should be
automatically traced. Extend the ptrace(PL_LWPINFO) to report that child just forked. Reviewed by: davidxu, jhb MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=217819
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r--sys/sys/ptrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index f909b865cec4..2583d59466d0 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -63,6 +63,8 @@
#define PT_TO_SCX 21
#define PT_SYSCALL 22
+#define PT_FOLLOW_FORK 23
+
#define PT_GETREGS 33 /* get general-purpose registers */
#define PT_SETREGS 34 /* set general-purpose registers */
#define PT_GETFPREGS 35 /* get floating-point registers */
@@ -104,10 +106,12 @@ struct ptrace_lwpinfo {
#define PL_FLAG_SCX 0x08 /* syscall leave point */
#define PL_FLAG_EXEC 0x10 /* exec(2) succeeded */
#define PL_FLAG_SI 0x20 /* siginfo is valid */
+#define PL_FLAG_FORKED 0x40 /* new child */
sigset_t pl_sigmask; /* LWP signal mask */
sigset_t pl_siglist; /* LWP pending signal */
struct __siginfo pl_siginfo; /* siginfo for signal */
char pl_tdname[MAXCOMLEN + 1]; /* LWP name */
+ int pl_child_pid; /* New child pid */
};
/* Argument structure for PT_VM_ENTRY. */