diff options
author | kib <kib@FreeBSD.org> | 2012-01-30 20:00:29 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-01-30 20:00:29 +0000 |
commit | e1d70baef7cdfc6bab6d11925e72c2c103c94b8d (patch) | |
tree | 8d86aa95f67b2572936e15b836b574d4e6613765 /sys/kern | |
parent | e6736c915b3f5d058a2df960934bb26e96179ce4 (diff) | |
download | FreeBSD-src-e1d70baef7cdfc6bab6d11925e72c2c103c94b8d.zip FreeBSD-src-e1d70baef7cdfc6bab6d11925e72c2c103c94b8d.tar.gz |
A debugger which requested PT_FOLLOW_FORK should get the notification
about new child not only when doing PT_TO_SCX, but also for PT_CONTINUE.
If TDB_FORK flag is set, always issue a stop, the same as is done for
TDB_EXEC.
Reported by: Dmitry Mikulin <dmitrym juniper net>
MFC after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index bba4479..75328f6 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -212,7 +212,8 @@ syscallret(struct thread *td, int error, struct syscall_args *sa __unused) * executes. If debugger requested tracing of syscall * returns, do it now too. */ - if (traced && ((td->td_dbgflags & TDB_EXEC) != 0 || + if (traced && + ((td->td_dbgflags & (TDB_FORK | TDB_EXEC)) != 0 || (p->p_stops & S_PT_SCX) != 0)) ptracestop(td, SIGTRAP); td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); |