Enable ptrace events on new child processes.
authorJohn Baldwin <jhb@FreeBSD.org>
Sat, 16 Jul 2016 00:01:21 +0000 (17:01 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 20 Jul 2016 18:01:45 +0000 (11:01 -0700)
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.

gdb/ChangeLog
gdb/fbsd-nat.c

index 678013f502eb731c1d47412fc9c3aa4e942a6c8d..36bc853cd1563172412b4aa6fe803ed7e3baf5d8 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+       * fbsd-nat.c (fbsd_wait): Use "fbsd_enable_proc_events" on
+       new child processes.
+
 2016-07-20  John Baldwin  <jhb@FreeBSD.org>
 
        * fbsd-nat.c (fbsd_enable_lwp_events): Remove function.
index 508ab1945e7123d0f810f29aaccc0ba22e66957f..5e4304e307f9a37127b63061c8cc07068593e2f4 100644 (file)
@@ -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);
This page took 0.040662 seconds and 4 git commands to generate.