blob: 641d2e22f1bb4de0b1e954778dd600ac2b4e425d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
commit bb2a62e694953c099c41d49f59947d3d91cc7c27
Author: John Baldwin <jhb@FreeBSD.org>
Date: Fri Jun 24 18:24:21 2016 -0700
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 gdb/fbsd-nat.c gdb/fbsd-nat.c
index c9548e9..0999712 100644
--- gdb/fbsd-nat.c
+++ 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);
|