[Lldb-commits] [PATCH] D46395: Remove Process references from the Host module

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 3 10:28:28 PDT 2018


clayborg added inline comments.


================
Comment at: source/Host/macosx/Host.mm:1501
+    bool monitoring = launch_info.MonitorProcess();
+    (void)monitoring;
+    assert(monitoring);
----------------
Do we not have a macro for silencing unused variables?


================
Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:873-874
+    const bool monitor_signals = false;
+    launch_info.SetMonitorProcessCallback(
+        [](lldb::pid_t, bool, int, int) { return true; }, monitor_signals);
     process_sp = Platform::DebugProcess(launch_info, debugger, target, error);
----------------
Now we won't reap the process from within LLDB or is the comment is wrong? This looks wrong. Also, if we truly have places that don't need to reap the process, then we should add a "launch_info.SetDefaultDontReapCallback()" or something to launch_info that will install a default do nothing callback instead of one or more clients doing this


================
Comment at: unittests/tools/lldb-server/tests/TestClient.cpp:119
+  Info.SetMonitorProcessCallback(
+      [](lldb::pid_t, bool, int, int) { return true; }, false);
 
----------------
I know on Mac we still must reap the process from both the process that launches (lldb) it **and** the ptrace parent process (lldb-server or debugserver). This will create zombies and buildbots will die horribly if this is wrong


https://reviews.llvm.org/D46395





More information about the lldb-commits mailing list