summaryrefslogtreecommitdiff
path: root/devel/gdb/files/commit-5fa14c6
blob: 66f54327153a5ade6913a71dcdcf3e8caff2c026 (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
28
29
30
commit 5fa14c6b9789bad6f91dd21889f7b1a0eb75c6d0
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Fri Jul 15 17:01:21 2016 -0700

    Enable ptrace events on new child processes.
    
    New child processes on FreeBSD do not inherit optional ptrace events
    such as fork and LWP events from the parent process.  Instead,
    explicitly enable events on new children when reporting a fork
    event.
    
    gdb/ChangeLog:
    
    	* fbsd-nat.c (fbsd_wait): Use "fbsd_enable_proc_events" on
    	new child processes.

diff --git gdb/fbsd-nat.c gdb/fbsd-nat.c
index 508ab19..5e4304e 100644
--- gdb/fbsd-nat.c
+++ gdb/fbsd-nat.c
@@ -836,6 +836,9 @@ fbsd_wait (struct target_ops *ops,
 		  child_ptid = ptid_build (child, pl.pl_lwpid, 0);
 		}
 
+	      /* Enable additional events on the child process.  */
+	      fbsd_enable_proc_events (ptid_get_pid (child_ptid));
+
 	      /* For vfork, the child process will have the P_PPWAIT
 		 flag set.  */
 	      fbsd_fetch_kinfo_proc (child, &kp);