From: John Baldwin Date: Sat, 25 Jun 2016 01:24:21 +0000 (-0700) Subject: Honor detach-on-fork on FreeBSD. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb2a62e694953c099c41d49f59947d3d91cc7c27;p=binutils-gdb.git Honor detach-on-fork on FreeBSD. Only detach from the new child process in the follow fork callback if detach_fork is true. gdb/ChangeLog: * fbsd-nat.c (fbsd_follow_fork): Only detach child if "detach_fork" is true. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e4f7e3ae520..b6bf7fa592d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-07-01 John Baldwin + + * fbsd-nat.c (fbsd_follow_fork): Only detach child if + "detach_fork" is true. + 2016-07-01 John Baldwin * x86bsd-nat.c: Include 'gdbthread.h'. diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index c9548e9a4bb..099971282ee 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -826,7 +826,7 @@ static int fbsd_follow_fork (struct target_ops *ops, int follow_child, int detach_fork) { - if (!follow_child) + if (!follow_child && detach_fork) { struct thread_info *tp = inferior_thread (); pid_t child_pid = ptid_get_pid (tp->pending_follow.value.related_pid);